nystudio107 / craft-instantanalytics

DEPRECATED: Instant Analytics brings full Google Analytics support to your Twig templates and automatic Craft Commerce integration with Google Enhanced Ecommerce.
https://nystudio107.com/
Other
20 stars 9 forks source link

UTM parameters not registered #32

Closed arifje closed 4 years ago

arifje commented 4 years ago

I wanted to track where our sales were coming from by using UTM parameters, but apparently the campaign parameters are not passed to Google Analytics when an order has completed.

I created an URL with the following parameters: ?utm_source=website&utm_medium=blog&utm_campaign=shirts

Then I created a test order with successful payment.

Result in Analytics (via Conversions/Ecommerce/Sales performance):

Screenshot 2020-07-05 at 15 36 18

No campaign data stored.

Also, when I look in Acquisition/Campaigns, the campaign is showing up, but no transaction and revenue is related. This should also be the case if I am correct.

Screenshot 2020-07-06 at 09 28 35

Looks like the UTM paramaters are ignored, or I am missing something?

Craft CMS 3.4.25 Commerce 3.1.10 Instant Analytics 1.1.7

khalwat commented 4 years ago

The code is there to handle them: https://github.com/nystudio107/craft-instantanalytics/blob/v1/src/services/IA.php#L449

Can you verify whether it ever reached that portion of the code for you?

arifje commented 4 years ago

Yes, it's reaching this part, also setting the parameters correctly:

Screenshot 2020-07-08 at 10 39 14

But for some reason no campaign data or revenue is popping up in GA.

khalwat commented 4 years ago

@skoften I believe you ended up with a solution here?

khalwat commented 4 years ago

I think it's possible this could be related to an issue fixed in 1.1.18 -- can you try updating to it?

khalwat commented 4 years ago

Addressed in https://github.com/nystudio107/craft-instantanalytics/commit/87bd6a8a077bcc498f4b1959e37621b8c96a4c6e

Can you set your semver to dev-develop and give it a whirl?

khalwat commented 4 years ago

Fix released in 1.1.19 -> https://github.com/nystudio107/craft-instantanalytics/releases/tag/1.1.9

arifje commented 4 years ago

thanks, updated the plugin, will let you know the result!