I am using GTM/GA to track a site that reloads (http refresh) itself every 30 seconds. This makes pageviews meaningless. How does one track the original page load, but not reloads of the same page?
For GA there is no difference between automatic and manual page refresh. It works by counting each refresh. There is no way to distinguish them from each other.
Although if you use javascript to refresh your website, you can try to disable tracking on page refresh and enable it on page load.
Related
I have a form that when submitted it goes to a different "success page" and I want to use that landing page to track conversions or count how many times people hit the "submit". I could use a page view tag but then that will fire every time someone goes to that page. So perhaps if someone hits the back button and reloads the page then that will count as a form submit.
So I would like to make a page view Tag in google tag manager that only fires if the page view is coming from a specific URL or referred from a specific URL. Is this possible?
Thanks in advance.
It is possible. Enable the built-in "referrer" variable, and on your target page create a trigger "pageview", with an added condition "referrer equals <your referrer>".
Some browsers might not send a referrer header, so this is not 100% reliable. If the page that sends the traffic is under your control, you might consider using a tracking parameter instead.
I am using History Change trigger in my GTM TAG to track my page views since mine in Single Page Application(Angular 6). I could see all the page views and its related data are tracked except Initial page load i.e., HomePage.
If I do refresh my home page it is getting tracked.
Do I need to use different trigger to capture initial page load or Am I missing something here?
Any reference link would be helpful.
You can add the "all page" trigger to the GTM tag and it will trigger on both history change and page load.
I've faced with a strange problem.
I have an event in GTM that triggered by Timer every 5 sec.
GA pageview tag (gtag) is implemented hardcoded above GTM.
In reports I see a lot of sessions with landing page (not set). It seems that timer generates a new session every time.
Any ideas?
I think you should first remove the GTM code on the page and see if the landing pages are showing up fine to find out if mixing both is causing the issue
I am working in ASP.NET (framework 2.0) with Master Pages.
I have a page that requires registration and then the user gets kicked back to the referring page.
I need to figure out how to provide a success lightbox that appears over the referring page, not the registration page (the event is fired on form submit).
I have the inline stuff in the master page and the scripts and everything fires just fine but the form is refreshed with the new (referring) page and the DIV gets hidden again.
Is sessions the only way to go here? Is there a way of having one lightbox appearing from the master page regardless of what the sub-pages are doing?
Thanks.
There should be a successful registration event. Can you emit some javascript in that scenario that would cause a redirection to the referring page. You could pass a parameter which would indicate that a light box should show up. I don't think you can redirect directly from successful registration because I am guessing that some cookie would need to be set- which the framework should handle. I might be off, but that is where I would start. I would try and avoid Session if possible.
I have a set of interlinked dynamic web pages.
When the user clicks from one page to another, I don't want any caching to happen - the request must go to the server, which will return an up-to-date page.
But when user clicks Back, I do want the cache to be used - some of the pages can take some time to generate, which is fine when you're clicking through to them, but not when you're clicking Back.
Is this possible?
(Please don't suggest re-engineering everything as a single page making AJAX queries!)
(Note: this question is the opposite of the ever-popular "How do I prevent caching when the user clicks Back?" question.)
A common trick for avoiding the browser cache when dealing with dynamic pages is to add a parameter to the link url that is unique (using the time, to the millisecond is common).
When the user hits the 'back' button, they will go back to the last rendered version, and should get it from the cache.