-
Notifications
You must be signed in to change notification settings - Fork 11
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 dataLayer.push() for GTM on dailyidea.com when opening ideas #1051
Comments
@ikosovec Ok, actually looks like we had a different issue, we use nuxt module |
@ikosovec The only place it may not work is when swiping between ideas, I'll add manual push for this. |
Hey! Now it is being pushed to the data layer, but not for all the pages of Daily Idea website, but only for the https://www.dailyidea.com/ideas-cards (which can be accessed via "Explore" in the main navigation, and "Get started" button on the homepage). The event is supposed to be pushed in to the data layer on all the URL-s of the website. |
@ikosovec I made edits, it should be deployed in 20 mins |
Hey @vedmant , here's the issue we're having with GTM explained. What we would like to achieve here is to track each even when users view an idea (each time).
Issue: Only the first page is tracked.
Why is this happening? The website is basically a Single Page Application (SPA). These complications occur whether you’re using Angular, React, Backbone, or any other front-end framework or code that manipulates the History API or fragment alongside changes to on-page content.
Solution: Developer needs to push the data into the data layer so that a custom event can be set up as a trigger and deployed via GTM.
A single line of code.
Code:
dataLayer.push({event: 'pageview'});
Here the issue is explained in more detail: https://www.bounteous.com/insights/2018/03/30/single-page-applications-google-analytics/
The text was updated successfully, but these errors were encountered: