-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement option to switch between conversion_async and gtag #20
Implement option to switch between conversion_async and gtag #20
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. Please do the manual tests and let's sync before merging.
@@ -739,8 +743,11 @@ describe('Adwords forwarder', function () { | |||
} | |||
}); | |||
|
|||
// debugger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
src/GoogleAdWordsEventForwarder.js
Outdated
var conversionPayload = { | ||
'send-to': gtagSiteId + '/' + conversionLabel | ||
}; | ||
if (!conversionLabel) { return }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should return an explicit null
, so that it's not just returning a payload of undefined
which looks like it could be a bug.
src/GoogleAdWordsEventForwarder.js
Outdated
var conversionPayload = { | ||
'send-to': gtagSiteId + '/' + conversionLabel | ||
}; | ||
if (!conversionLabel) { return }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto to returning null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nits
# [2.1.0](v2.0.1...v2.1.0) (2021-11-11) ### Bug Fixes * Correct send_to in gtag API ([#23](#23)) ([af01adc](af01adc)) * Prevent unmapped events from being forwarded ([#22](#22)) ([50e6d27](50e6d27)) ### Features * Implement option to switch between conversion_async and gtag ([#20](#20)) ([198e232](198e232))
Google is pushing customers to start using Google Site Tags (gtag) for all analytic tracking. As Google is handling backwards compatibility themselves, we are offering our users a way to opt into gtag so that they can begin transitioning to the latest and greatest versions of Google Ads analytics.