How to debug Google DFP? - google-tag-manager

The standard ?google_console=1 isn't working for us at the moment. We're using the Google Publisher Tag (asynchronous).

The Google publisher console is OK for spot checks, but I'd highly suggest moving away from that method. Sometimes the Google pub console will list partial data for ad units...and I have had rough experiences with using the Google pub console for debugging sync GPT.
If you're using Chrome, a stronger method would be the following:
Load the page.
Open the Chrome Developer Tools, and click on the Network tab.
In the filter field, enter "doubleclick" (minus the quotes).
Ctrl+R to refresh the page.
All the DFP ad calls will begin populating (typically have ads and gampad references in the name).
Click on an ad call. The info should display in the right panel.
For quick reference:
iu: (the ad unit portion of the string)
Cust_params or scp: typically most custom criteria targeting values should display in either of these two, depending on tag implementation
Additionally, in the Response tab, under Headers, the Google Line Item ID and Google Creative ID will be listed....this is extremely helpful for debug/troubleshooting. You can also see XML returns for video creatives.
Also, if you need to debug outside of Chrome, Charles/Fiddler are good debug alternatives. Keep am eye out for the Query String and Header tabs, but the same info should pass thru. Filtering is key.
Hope this helps.

Just try to run the following command in JS console:
googletag.openConsole();
Note: You can also specify ID of the div element containing the ad slot in the function argument.
Or paste the following code into the bookmark in Bookmark Manager:
javascript:googletag.openConsole();
then navigate to the website and click on newly created bookmark.
Or use the following HTML code to create a link on your content page, e.g.:
Open console
See also:
Enable the Google Publisher Console
GPT Reference

Related

http GET, finding tag name for fired GTM event

I want to see which GTM tag was fired by looking at the network tab in Chrome dev tools. Unfortunately, it looks that the data is compressed or something.
I'm in this situation because Google AMP pages don't allow the nice web based GTM debugger that's usually available. Thus you must use dev tools for QA.
The http calls use GET and have a path of /collect. I've expanded everything I can find and no dice.
Here's the summary line from my network tab:
collect?v=1&_v=a1&gtm=2agbc0GTM-N83V7HM&ds=AMP&aip…=&t=event&ec=&ea=&el=&a=1305&z=0.7694027908318071
I'm not sure if including a picture of my network tab would be useful since there's just so much information.
Any help is appreciated. There are quite a number of sites that tell you to use the network tab to debug GTM. But, I can't find any that help with deciphering its contents.
/collect is the endpoint for Google Analytics. The "t" parameter indicates what type of hit this is - in this case it's an event, which further confirmed by "ec" (event category), "ea" (event action) and "el" (event label).
So this is (as you already know) a Google Analytics event tracking call. However it is not a valid call, since the mandatory parameters ("ec" and "ea") are empty.
And alas you cannot get the name of the GTM tag from the network call. You would have to enable preview mode, step through the different GTM events (left side of the debug panel) to see if they fire GA tags. Then in the "tag" pane of the preview panel you have to look into the GA tags (click the "more" link in the tag info) to see which tag sends empty values.

checking analytics setup for page I do not own

I'm a consumer data analyst who is not very familiar to coding other than occasional encounters with HTML and Python, and I'm just starting with the coding part of Web Analytics. In particular, I need to learn about checking websites I don't own (therefore I don't have access to their Analytics accounts) for tracking info, but it has been phenomenally hard to find information on which tracking function each component of code stand for, or to what extent it is visible from the page source.
For a project, here is a page I'm trying to check for Google Analytics/Tag Manager/alternative analytics setup, and see what is exactly being tracked on it. Other than the source code, I checked it with Ghostery, which gave me this Tag Manager code page. Is it possible to check tracking info from these two (events, pageviews, URI and how many custom dimensions there is, specifically), and which part of the code includes that info (particularly URI and dimension info - the first two, I have more idea about)?
This is a page I'm also looking into. I can see that this one has Google Analytics/Tag manager, but again, I can't make sure of what is being tracked, and whether the Analytics/Tag Manager setup is looking -potentially- problematic in any way. Here is the Tag Manager page for this one that I obtained through Ghostery.
Any help would be much appreciated...
Looks like what you are looking for is Google Tag Assistant extension for google chrome: https://get.google.com/tagassistant/
you can download it from here: https://chrome.google.com/webstore/detail/tag-assistant-by-google/kejbdjndbnbjgmefkgdddjlbokphdefk?hl=en
When you install it it will appear as icon on any page you visit and it will show you all GA implementations on a page:
You can select tracking ID you are interested in and it will tell you how many Page Views/events were fired for that particular tracking ID only:
Then you can select individual tracking event/page view and see all data that are being sent with that tracking request. Just Click on URLs and click the icon to put the data in table:
Here "cd" stands for Custom Dimension, so here you can clearly see 2 custom dimensions that are being tracked:
Hope this helps, good luck!

Listeners return different results on different browsers even after clearing cache/cookies

I believe Google Tag Manager is fairly new and nothing much is going on yet. I went all around Google looking for a solution, but simply gave up after trying all possible solutions. I'm using a Wordpress blog platform, and have integrated Universal Analytics and Google Tag Manager. The settings for my listeners are as follows:
====Link Click Listener====
====Outbound Link Click Tagger====
====Outbound Link Rule====
I used console to test the dataLayer, and it retrieves gtm.load, gtm.js and gtm.dom, but regardless of whatever I click, I see on my Google Analytics that the events are undefined even though I provided the necessary parameter to name them. However, when I tried to do it on a different browser, it works, but not completely (instead of outbound link, it will record it under click), or the outbound works for a completely random client on the Internet, returning the tag "outbound-link" but with an undefined action.
Any ideas?
UPDATE I just noticed that there is a difference between a left-mouse-button click and a middle-mouse-button click. The middle one is not measured, whereas the left-mouse-button click is.
For starters there is an error in your rule. You want "{{element url}} does not contain welink.com" instead of just {{url}} (which would mean that the tag should not fire on your domain at all).

Adding Google's standard search (not custom) to my website

My intention is to embed Google results in my website. I don't want to customise the domain/s on which the search is performed or anything, just a 'bog standard' Google search based on search parameters I pass it.
2 questions:
How do I display google results on my website as a response to search criteria entered into a textbox I have?
Is there any legislation I need to take into account?
I know my second question sounds rather strange but I'm aware that what I'm appearing to do here is present content driven by Google as though it's my own so want to avoid breaching any copyright or 'same-origin policy' type thing.
What I've Tried/Ways I Know I Could Achieve This
Screen scraping Google's response to a simple web request with the necessary query parameters (but seems a bit excessive)
Google's custom search (but I don't want to customise anything)
I've tagged this question for some more context.
As it is mentioned here
you can use your own XML parser to customize the display for your
search users.
with an http request like this:
GET /search?q=bill+material&output=xml&client=test&site=operations
But it has a limitation on number of requests per day, 500 or 1000 I guess.
Custom Search can be configured to include the entire Web in its results:
From the Google Custom Search homepage, click New search engine.
In the Sites to Search box, enter at least one valid URL (e.g. www.google.com).
Click Create.
On the next page, under Optional next steps, click Edit.
On the Basics tab, under Search Preferences, select Search the entire web but emphasize included sites.
Click Save Changes.
In the left-hand menu, under Control Panel, click Sites.
Delete the site you entered during the initial setup process.

Unable to preview Story

I have a app in which I created a custom object with custom properties. The object is called "character" and the custom properties are theme (as string) and user (as profile).
I have an action called "vote" which contains a property "character" that references the custom object above.
I created a story that links the action to the object. All the flexible sentences refer to "character.title".
This was working fine for awhile and whenever I published a story I was able to see a preview of it in the story settings. Now I get an error image
I can publish using graph api explorer with no problems. And if I debug a character URL using the debugger tool, there are no errors. Everything looks good, but I can't see a preview and I'm worried that my published stories are not actually posting.
Another strange thing is that I have another app that I use for staging and testing purposes that doesn't have this problem.
I had to click on Edit Attachments in the Story settings and set values for at least one of the fields. I guess without it Facebook didn't know how to render the preview. There should be an appropriate warning message.
Note: my other apps have been working fine without having to fill values in the Edit Attachments window. This app was a strange exception.

Resources