Recently I’m working on implementing Google Publisher Tag (GPT) on one of the sites that I work on. This is on a Drupal 7 (D7) site and we are using the Doubleclick for Publishers (DFP) contributed module.
Here’s the introduction text from the DFP module:
The DFP module integrates Google Publisher Tags (GPT) as supported by the new Doubleclick for Publishers (DFP). This module evolved from the DART module in order to support Google’s major overhaul of how Ad Tags work.
We also implemented this on Hoopla’s forum which is where we first ran in to the warning “Exception invoking function: Object 73 has no method ‘join'”. Now if you’re new to GPT I should probably tell you that you only see this message in the Google DFP Console. In order to load the console start Google’s browser Chrome and go to your site. You need to add a query string to it that turns on the console ?google_console=1 or ?google_console_force = 1. Now that just turns the console on but doesn’t actually show it. To show it you need to do a key combo, Windows “Ctrl + F10” or MAC “Func + Ctrl + F10”. When the console is loaded click on Page Requests and look for any errors.
To enable the Publisher Console on a page tagged with the Google Publisher Tag:
Append
?google_console=1
to your page’s URL.For example, if your page is located at
www.google.com/gpt
, you’d modify the URL towww.google.com/gpt?google_console=1
.Use the keyboard shortcut Ctrl+F10 (on a Mac, use Function+Ctrl+F10) to open the console.
Alternatively, you can append
?google_force_console=1
to your page’s URL. This causes the console to be automatically displayed when the page is loaded, rather than requiring the keyboard shortcut described in Step 2.For example, if your page is located at
www.google.com/gpt
, you’d modify the URL towww.google.com/gpt?google_force_console=1
.
The console has two main tabs that display page information: “Ad Units” and “Page Request”. In addition, the panel on the right indicates whether the page was tagged correctly, with details in the “Ad Units” and “Page Request” tabs. These features are described in the sections below.
I kept seeing the join error and didn’t know why. What does it mean? It’s not a very helpful error message, at least for debugging purposes. I eventually tracked it down and was relieved when I finally fixed it.
Problem:
Exception invoking function: Object 73 has no method ‘join’
Solution:
I was passing an integer in as a value unknowingly GPT only supports strings. So I told javaScript to make my integer a string and the error went away.
googletag.pubads().setTargeting(“pageCount”,pageCount.toString());
This was easier to find using software, for a MAC, called Charles. Charles is described as:
Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP and SSL / HTTPS traffic between their machine and the Internet. This includes requests, responses and the HTTP headers (which contain the cookies and caching information).
Using Charles I was able to see that my custom values were being passed in but stopped at pageCount. Everything past that in the code was being ignored. A quick how to on Charles, make sure you aren’t VPN’d in to a network or that software will grab the traffic first and it will never pass through Charles.
- Click the record button.
- Load the website.
- Click the record button, this stops it from capturing traffic. I like to do this just so that the list on the left doesn’t get cluttered up with stuff I don’t care about.
- Find http://pubads.g.doubleclick.net on the left
- Expand this and expand gampad/
- Click on any of the ads?(blah blah)
- On the right side, click on Request
- Find cust_params and review.
I hope this helped you. It took me too long to find the solution and it shouldn’t have been that hard. Hopefully this will speed up your debugging process.
I’d love to hear from you. Let me know if you have other helpful tips.