nystudio107 / instantanalytics

DEPRECATED Instant Analytics brings full Google Analytics support to your Twig templates and automatic Craft Commerce integration with Google Enhanced Ecommerce.
Other
101 stars 4 forks source link

UTM Parameter not working with Instant Analytics #16

Closed hongc-cc closed 6 years ago

hongc-cc commented 6 years ago

Edited: TL;DR: Pageview with UTM parameter not working.

We used UTM parameters to mark all external Pageviews from Newsletter, instagram..etc.

Pageview URL with UTM Parameters (e.g. utm_campaign, utm_source, utm_medium) will get those UTM parameters stripped. In GA, these view's source/medium will become "yourdomain.com / referral", and the URL get recorder would have the UTM parameters stripped.

I am not sure if this is standard behaviour of Google Analytics Measurement Protocol, and if we should write a twig snippet to convert the UTM_campaign into instantAnalytics.setCampaignName .

khalwat commented 6 years ago

Ah, so you're expecting that it would look at the query string, and automatically decode those UTM parameters?

Currently it does not do that, and you'd have to do it manually as you mentioned, but that's an interesting idea for a FR.

khalwat commented 6 years ago

@idolab ?

khalwat commented 6 years ago

I added support for this in 1.1.12:

https://github.com/nystudio107/instantanalytics/releases/tag/1.1.12

...which I think is what you wanted @idolab

hongc-cc commented 6 years ago

argh.. i didn't publish my prevous comment, sorry for that @khalwat Actually i wrote a little script to fix that, but i am very happy that you take auto-parsing into the plugin! cool!