impress-org/give-google-analytics

fix: Ensure source and medium are captured correctly for donations

Closed this issue · 8 comments

Source/Medium should be recorded, not undefined:

schermata-2018-08-04-alle-10-41-52

I have replicated this in my test environment, so either it's something I and the customer are doing wrong or the issues resolved in #25 are not fully fixed.

Related

https://secure.helpscout.net/conversation/623784593/21798/

@Benunc Google analytic tracker does not work for administrator, instead of test with the guest donor.

I tried URL like this http://test1.givewp.com/donations/ga-tracking-test-2/?utm_source=Give_Testing&utm_medium=Give_Testing_Site&utm_campaign=Give_Developer.

Which sets give_campaign properly but rewrite give_source, give_medium cookie.

@DevinWalker Can you look at this:
set cookie:https://github.com/WordImpress/Give-Google-Analytics/blob/master/includes/actions.php#L245
reset cookie: https://github.com/WordImpress/Give-Google-Analytics/blob/master/includes/actions.php#L234

image

Customers are reporting that it's not working for guests:

image-2

(I'd assume 400 sessions are not coming from the admin.)

ticket for reference: https://secure.helpscout.net/conversation/541232946/15465/

@DevinWalker As i told in this comment: #34 (comment)

After removing this code :https://github.com/WordImpress/Give-Google-Analytics/blob/master/includes/actions.php#L243#23L249

source and medium set properlly in Google analytic

image

@ravinderk please explain why removing that code corrects the issue.

Reopening this. See this video:

https://screencast-o-matic.com/watch/cFQXYeqmaW

@ravinderk Please review the video from @Benunc and post your findings once you understand why source and medium are lost after a donation is submitted. Thanks.

@ravinderk Please look into this today and confirm if the issue Ben is showing in the video is still an issue so we can respond to the customer accordingly.

Fixed in PR #38