coop182 / jquery.dfp.js

A jQuery implementation for Google DoubleClick for Publishers (DFP)
MIT License
278 stars 91 forks source link

Issue with UrlPath and query strings #154

Open coleh33 opened 5 years ago

coleh33 commented 5 years ago

I am having an issue getting a line item to display only on the homepage of a site.

I have went into Google Ad Manager and setup the key/value pair UrlPath and it works for targeting specific URLs "/page-name" however in my case I want to target just the homepage for some line items. I setup the rule "/" and it works fine by not showing on other pages except one page in particular. This is the ?s= query string that shows up in WordPress when someone searches with the search bar.

Is it possible the JQuery DFP library is stripping off the /?s= at the end and sending the page URL as "/" so Ad Manager is tricked into thinking it meets the rule? Trying to find out how I can get Ad Manager to recognize the /?s= doesn't meet the "/" UrlPath rule.

Thanks