Debug Google Tag Manager

Please post your issues and questions about One Page Checkout for Virtuemart 2 to this forum.

Debug Google Tag Manager

Postby admin » Fri Jan 23, 2015 12:39 pm

hello friends, since we included google tag manager in opc, this is how to check on if it's working properly:

1. set up your google tag manager (google analytics + remarketing + adwords ... etc)
2. enable all the events in opc + enable it for required order status (if you want to track orders)
3. if you are using multidomain/multilanguage site, you may want to add per-language GTMs

4. Debug GTM:
Image

5. enable the debug mode:
Image

6. visit your site and see data sent to google tag manager:
Image

Enjoy,
Best Regards, Stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: Debug Google Tag Manager

Postby admin » Fri Jan 23, 2015 12:52 pm

and the proper setting for adwords remarkeging should look like this:
Image

stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: Debug Google Tag Manager

Postby atrus80 » Sat Jan 24, 2015 10:01 am

Hi Stan,

I'm glad to to inform you that i managed to have the Remarketing Tag properly validated using GTM Assistant using OPC, so i will share it here for other OPC users. For more info please refer to https://support.google.com/tagmanager/answer/3002580?hl=en. Important note: with are implementing the "Single Remarketing Tag per Funnel Step" method, which, as per Google, is considered the most safe and robust option because it minimizes the use of custom JavaScript code and instead relies on built in Google Tag Manager features (such as rules and auto-event tracking). Its main drawback is the complex setup, but with OPC, this is now very easy.

After you setup OPC GTM plugin, you need to setup your Remarketing Tag in your Google GTM account:

IMPORTANT STEPS

1. Create a new Datalayer Variable to pass the value of google_tag_params to your Tag, see screenshot below:

macro.jpg
Datalayer Variable
macro.jpg (57.47 KiB) Viewed 15944 times


2. Now you need to assign the new macro as your main Datalayer Variable, see screenshot below:

assign-macro.jpg
Remarketing Validation
assign-macro.jpg (77.28 KiB) Viewed 15944 times


3. Finally you need to create a firing rule for the tag based in the fireRemarketingTag event, see below:

rule.jpg
Firing Rule
rule.jpg (50.25 KiB) Viewed 15944 times


This is it basically and you are ready to go. See my next post for the next steps.
atrus80
 
Posts: 85
Joined: Mon Feb 06, 2012 6:22 pm

Re: Debug Google Tag Manager

Postby atrus80 » Sat Jan 24, 2015 10:43 am

Now go to your website and visit a page where the tag is fired. Using GTM Assistant, go to remarketing tag and you will see a new tab called "Remarketing Validation". Enter the corresponding Google Merchant Account ID and GTM will validate the products in the page against your submitted feed and will advise you accordingly. Note the REQUESTS done by the tag.

remarketing validation.jpg
Remarketing Validation
remarketing validation.jpg (44.79 KiB) Viewed 15944 times


Click on the REQUESTS at the bottom. You can clearly see then at the Metadata tab the google_tag_params values passed to GTM:

request-metadata.jpg
Metadata
request-metadata.jpg (57.27 KiB) Viewed 15944 times


You can also check with Google Chrome Console -> Network -> Find the googleads entry -> Headers -> Query String Parameters and check the Data value. You should see the parameters passed to GTM, see below:

console.jpg
Chrome Console
console.jpg (121.76 KiB) Viewed 15944 times


For more information on the validation of the remarketing tag you may check here: https://developers.google.com/adwords-remarketing-tag/verification

Pending Items to Fix:

- Duplication of GTM ID tags.
- Duplication of Remarketing Tag Requests?
- Tag to fire also in Category, Search Results, Home Page etc..
- Confirm validity of ecomm_pcat, ecomm_pname, ecomm_pvalue vars. Google is not taking them into consideration for dynamic remarketing so better to clean up the code.

Rgrds,
Chris
atrus80
 
Posts: 85
Joined: Mon Feb 06, 2012 6:22 pm

Re: Debug Google Tag Manager

Postby admin » Tue Jan 27, 2015 8:30 pm

hello Chris, per our conversation

- i believe google tag assistant does not really "check" for double gtm-id tags or double remarketing tags, but it just scans the rendered code and if it finds the variables more than once, it thinks, they are included twice.

in general, it just cannot recognize a code like this:

if (true)
{
// GTM ID used here
}
else
{
// GTM ID used here some other way
}

the code above would still trigger the "doubles" notice.

i will try to add the category / search or other events to opc soon.

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 2