New change in adwords pixel
rubyrailsninja opened this issue · 11 comments
Hi !
According to this page : https://support.google.com/adwords/answer/7548399
Google change his pixel integration since 2017 october
Is there a simple way to monkey patch it?
Regards
Julien
sadly I don't know the google adwords stuff right now that well. Do you know what exactly does not work or should be changed?
Would be awesome if you're interested in contributing this change...I can help and point you to the right parts of the code.
hello
yes I can try to contribute
tell me where :)
great!
so first it would be helpful to write down here in the issue what exactly we need to change. How does the new analytics code look like? and what exactly is changed?
Then we need to review if the changes are fully backwards compatible - meaning that we do not break anything for existing users.
you can see the current analytics code here:
https://github.com/railslove/rack-tracker/blob/master/lib/rack/tracker/google_analytics/template/google_analytics.erb
So let's go through that file bit by bit and update it.
ok
according to my previous link :
Global site tag
`
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-123456789"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag("js", new Date()); gtag("config", "AW-123456789"); </script>`
and event snippet
<!-- Event snippet for Example conversion page --> <script> gtag('event', 'conversion', {'send_to': 'AW-123456789/AbC-D_efG-h12_34-567', 'value': 1.0, 'currency': 'USD' }); </script>
and since I saw that GTM is included in rack tracker, maybe the second part is only needed in the google conversion template ?
ok,
is there the support for the additional options, in here: https://github.com/railslove/rack-tracker/blob/master/lib/rack/tracker/google_analytics/template/google_analytics.erb#L11-L40 ?
no support for options between this lines ^^
Are you sure?
we for sure must support the current options and be backward compatible
I read it again and I don't see where additional options would be used ...
I've started on a PR for this. Most of it's there. Would love some help from anyone closer to Google tracking to get it over the finish line.
All options are supported on google's end but we could support both old and new tracking versions for awhile and slowly add the options to gtag.js (google global) as people need them.