Forums Forums PPC Script to Check Presence of Specific URL Parameters

  • PPC

    Script to Check Presence of Specific URL Parameters

    Posted by seohelper on May 6, 2021 at 1:49 pm

    Is there a way to tweak the URL checker script to look for specific URL parameters? I have client using various reporting platforms & tagging structures (e.g. “CID=” and have gotten burned a couple times by not including or having them drop off. Also open to other suggestions – Doesn’t need to be a Script.

    julmod- replied 4 years, 10 months ago 1 Member · 3 Replies
  • 3 Replies
  • thatwiedeman

    Guest
    May 6, 2021 at 2:26 pm

    Analytics keeps track of all of those sources automatically.
    or alot of really simple
    if(window.location.href.includes(‘CID=’)){
    // do stuff

    }

  • Bolibs

    Guest
    May 7, 2021 at 10:22 am

    As a code-free cheat, you could use the standard [link checker](https://developers.google.com/google-ads/scripts/docs/solutions/link-checker) and tick the box for Save OK Urls to spreadsheet, then just set up a google sheets function to check whether all the URLs have the parameters you want (something like this: If all your OK Urls are in column A:

    `=IF(ISNUMBER(FIND(“CID=”,A1)),1,0) // Put this all down column B`

    `=COUNTA(A:A)-SUM(B:B) // This tells you how many errors there are`

    or be a bit fancier and array formula it.)

    Then run the URL checker after uploading any URLs

  • julmod-

    Guest
    May 13, 2021 at 10:56 am

    Surprised this doesn’t already exist, and thought it might be useful for others too – so I just wrote it 🙂

    [Here it is](https://www.acuto.io/post/url-tracking-checker-google-ads-script), would appreciate any feedback if you do use it and it helps!

Log in to reply.