Skip to content
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

Add Google Tag Manager #344

Merged
merged 9 commits into from Mar 20, 2023
Merged

Add Google Tag Manager #344

merged 9 commits into from Mar 20, 2023

Conversation

MrOrz
Copy link
Member

@MrOrz MrOrz commented Mar 12, 2023

Implement tag manager for LIFF in the design doc.

This PR replaces gtag with dataLayer.push(). After events and variables are pushed to Google Tag Manager's dataLayer, tag settings in Tag Manager takes over and submits events to Universal Analytics and GA4.

See code changes to README for list of events and variables pushed to dataLayer.

Note that although we removed GA_ID from .env.sample in this PR, it is still used by univeral-analytics in webhooks. Will remove in the future.

Tag Manager tags

image

Universal analytics

ViewArticle and ViewReply events; backward compatible.
image

GA4

view_item event with article and replies
image

image

@MrOrz MrOrz self-assigned this Mar 12, 2023
@MrOrz MrOrz requested a review from nonumpa March 12, 2023 10:58
@coveralls
Copy link

coveralls commented Mar 12, 2023

Pull Request Test Coverage Report for Build 4398418767

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.589%

Totals Coverage Status
Change from base Build 4300492218: 0.0%
Covered Lines: 944
Relevant Lines: 1011

💛 - Coveralls

@MrOrz MrOrz marked this pull request as ready for review March 13, 2023 19:53
@MrOrz MrOrz merged commit 0bc402e into master Mar 20, 2023
8 checks passed
@MrOrz MrOrz deleted the add-gtm branch March 20, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants