Open jacksegal opened 2 years ago
That GA4 recommended events link is gold!
@bryancasler - What are your thoughts about tracking on thank you page (even if inside of template) vs inside the enOnSubmit
callback?
Some thoughts:
pageNumber
/ pageCount
) doesn't always work because of redirectsenOnSubmit
callback doesn't always work because you can't guarantee the request will actually be a success - for example on a donation page, the enOnSubmit
callback gets called even if you enter incorrect card details (which would fail). In addition, you don't have access to the pageJson attributes about the donation (these could be worked out manually, but that logic might differ from client to client)Therefore is the more accurate way to do it a code block that gets added to the thank you page (wherever that is - same page or redirected page)? Feels the most manual way, although use of the component library would help.
We could also have two ways of doing it:
pageNumber
/ pageCount
for when there's no redirectWhat do you think?
GA event names: https://support.google.com/analytics/answer/9267735?hl=en FB event names: https://developers.facebook.com/docs/meta-pixel/reference
Conversions:
Data:
pageJson
- would need to pass whole object (including PageViews)additionalPageJson
- we could have a standard object that developers couldpush()
to that gets passed withpageJson
- or we could just usepageJson
(maybe bad idea to clutter native EN object)Other events (not conversion):
Method:
GTM Implementation:
conversion
and we'd look at thepageJson
to work out the actual event - Donate, Petition, etc.)CompleteRegistration
for signup and then alsoLead
if they opt in to email (Facebook named events)Questions:
enOnSubmit
in multiple places? (we don't want to override the client's own calls)