Page Views before Event tracking - google-analytics

Is it possible to view the pages that a user has viewed before they have activated the event?
I have tried running custom reports but not sure if its the right thing to do or if I am even doing right.

Related

GTM trigger not firing on custom pop-up screen

On our site, https://www.nzmotorhomerentals.co.nz/ we have created an tag in our GTM container to track Adwords conversion, however are having issues getting the tag to fire when a user clicks the Confirm button at the end of the booking process. We believe this is due to the pop-up screen once a user clicks on a search result.
At the moment the booking process is as follows:
1. User lands on homepage or other landing page.
2. User enters search criteria, and clicks 'Search'
3. User lands on /results page and then clicks 'Select' on chosen vehicle
4. Pop-up window appears and user clicks 'Go to final step'
5. User lands on final booking page and clicks 'Confirm'. When a user clicks 'Confirm' this is when we want the tag to fire.
We have tried a wide range of trigger variables with no luck. We managed to get a tag to fire on step 1 when a user clicks 'Search' as a way of troubleshooting, however have not been able to get any tags to fire once a user lands on the /results page and further into the booking flow.
All content from /results onward is a custom piece of html that is pulling from a broker site (this website is an affiliate model). We are wondering if Google Manager is able to read this custom code at all.
Any assistance on how variables to set to fire this trigger is much appreciated.
your booking form is implemented in the iframe and is unavailable to Tag Manager.

GTM: pageview not firing in product page section even when all pages trigger

I'm inspecting the tags implementation for a company.
1) I'm finding it strange that the PageView tag implemented with GTM fires in the home page, but not in the product page.
For example, in this laptop producto page:
https://www.lacuracao.pe/curacao/laptop-asus-x507ub-br161t-core-i5-156-1tb-4gb-x507ub-br161t?cm_cr=No+Campaign--Web+Activity--No+Name-_-Widget_CatalogEntryRecommendation_701_3074457345618283237-_-Laptop+Asus+X507UB-BR161T+15.6%22+Core+i5+7ma+Generaci%C3%B3n+1TB+4GB+NVIDIA+2GB-productImageLink
Even provided that this tag is supposed to fire on all pages.
2) Also I'm noticing that my clicks listeners are not working in this section also. But work in other sections of the page. May it be the gtm.click or the gtm.linkClick
3) The GTM container is instaled in the code, as this image shows:
What could be preventing the PageView Tag to fire and the click listeners to work?
My PageView TAG:
The All Pages trigger is the default one.
This is my container preview:
https://www.googletagmanager.com/start_preview/gtm?uiv2&id=GTM-5VMNG2H&gtm_auth=T6D4je8bCBlHxyaINtja3Q&gtm_preview=env-5&gtm_debug=x&url=https://www.lacuracao.pe/curacao/laptop-asus-x507ub-br161t-core-i5-156-1tb-4gb-x507ub-br161t?cm_cr=No+Campaign--Web+Activity--No+Name-_-Widget_CatalogEntryRecommendation_701_3074457345618283237-_-Laptop+Asus+X507UB-BR161T+15.6%22+Core+i5+7ma+Generaci%C3%B3n+1TB+4GB+NVIDIA+2GB-productImageLink
You may want to check how the dataLayer is being implemented. I ran into an issue where my Page View tag/All Pages trigger was broken because I had initialized the dataLayer after the gtm code snippet.

How to track from which page the modal was popped up in google analytics?

I have an acknowledgement popup modals on near about 15 html pages which appears on successful form completion. How would I know/track from which page the modal was triggered?
I have added a google tag manager code for popup event of modals which shows the number of count it was popped up. I also read about Virtual page views but not sure if its a correct method to track page wise popups.
Please help.
TIA

Google Tag Manager Click Variables sometimes not populating on click

I'm using Google Tag Manager click variables click element and click url to track button clicks on my website.
For some reason, the Click variables are sometimes not populating upon click sending "undefined" data to Google Tag Manager.
For example the BOOK NOW button on this page in both desktop and mobile (http://www.maverickhelicopter.com/mobile/foodie.aspx) often fail to populate click variable data. This is just an example page.
It happens on other pages as well (both desktop and mobile version). If it refresh the page a few times or start a new session and try the click again the variables populate.
Does anyone know why this might be happening? Is it an issue with the way Tag Manager is loading, or with the html on the site? Website is built in ASP.net and Google Tag Manager is installed per the instructions provided by Google.
It's happening becuase the actual click element is different depending where exactly you click on your button. From your page:
Notice how "BOOK NOW" button is not fully highlighted. That means when you click outside of highligted area the browser understands to navigate to href page but actual clicked element in GTM is not the link <a href="..."> but rather your wrapper <div style="float:right; width:50%;> element which does not have url so that's why you can see "undefined"
You can fix it by removing any padding you have set on link inside your wrapper div.

listview itemcommand not firing after back button

I have page that uses a multiview. Each view contains a separate user control. One of these user controls has a list view with an image button that causes the loading of a different view in the multiview. All is fine up until this point. When the user hits the back button, they are taken back to the user control that contains the list view. The user then clicks on another image button to view different data and it returns to the detail user control using the same data as before. While debugging, I have seen that the item command event does not fire after hitting the back button.
I have tried replacing the multiview and putting each user control into separate panels. This did not change the outcome at all.
I have tried setting a cookie that expires 5 seconds after page load. When the user continues to the next page, then clicks back (and it has been longer than 5 seconds), I force the form to submit again. This loads the next control again instead of reloading the page.
I have tried setting the cacheability to no cache. This causes a "page expired" message and the user has to refresh the page. This is ugly for the user and definitely takes away from the user experience.
I am looking for the cleanest way for a user to click back and have the page reloaded so that the item command event fires correctly again.
The reason is that Back doesn't affect the Page Life Cycle. It's definitely because the page is cached and cached page doesn't execute on server. You can try this code to get rid of this issue.
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
It took a lot of research to find this answer, so hopefully other people stumble upon this question and find my answer. I was astonished that I was actually able to find this. Ok, enough gloating.
Because the page does not postback when the user clicks the back button, the events are not fired correctly causing problems with the next page. What has to happen is you need to be able to handle the browser's navigation buttons (i.e. back and forward). To do this you have to set EnableHistory to true within the script manager and handle the Navigate event from the script manager. You can then reload the controls using the information you save in the state object.
I used these articles from Dino Esposito on DotNetSlackers.com as a reference. Server Side History Management and Client Side History Management

Resources