I'm trying to pull a GCLID Parameter (EXAMPLE: https://www.example.com?gclid=CjwKCAjwiMj2BRBFEiwAYfTbCjQ-LBlWhBymAH4piPD3FalPCbl24kE7VQ4JtNJ4Jfj8XPE) from a URL and insert it into a Squarespace hidden field.

Ideally, I'd like to do this through a GTM script, but I can also add it directly into Squarespace via site-wide footer code injection. All Squarespace hidden fields start with the prefix "SQF" (in my case, the hidden field is: SQF_GCLID

I've been playing with something like this:

`<script> window.Squarespace.onInitialize(Y, function() {   /**    * Get the URL parameters    * source: https://css-tricks.com/snippets/javascript/get-url-variables/    * @param  {String} url The URL    * @return {Object}     The URL parameters    */   var getParams = function (url) {     var params = {};     var parser = document.createElement('a');     parser.href = url;     var query = parser.search.substring(1);     var vars = query.split('&');     for (var i=0; i<vars.length; i++) {       var pair = vars[i].split('=');       params[pair[0]] = decodeURIComponent(pair[1]);     }     return params;   };   /**    * Get UTM parameters from the current URL, insert them into correspondingly-named Squarespace form hidden fields.    */   var params = getParams(window.location.href);   var param;   var paramMatch;   var paramBase;   var formFields;   var i;   for (param in params) {     paramMatch = param.match(/^gclid(.*)/i);     if (!paramMatch) {         continue;     }     paramBase = paramMatch[1];     formFields = document.getElementsByName("SQF_GCLID");     i = formFields.length;     while (i--) {       if (formFields[i]) {         formFields[i].value = params[param];        }     }   } }); </script>` 

which is based on the code found here.

There are no other parameters to pass (just gclid).

I am using wordpress to create a website. I have shifted my website to new domain but i have used the backup of old domain name.

now the old domain is not owned by me someone else has booked it. i am trying to apply for google ads but every time i try to apply they reject my request due to bad links.

my previous domain was .com now i have .com.au domain, report shows bad links associated with old domain.

can anyone guide me how to remove these links

i want to create a dynamic remarketing campaign in Google Ads, but i have to let GTM know where to extract the information for ecomm_prodid, ecomm_pagetype, ecomm_totalvalue and ecomm_category from my website. I understand that i have to create a Data Layer Variable but i just don't know how to make those tags extract the necessary info from my website. I also know that you should be able to see in Google Tag Assistant the Metadata for your products (price, brand, category etc) in the Dynamic Remarketing Tag. Unfortunately i cannot add code to my website as it was created on a platform that doesn't allow custom code, so i have to use GTM.

For example the class for the price is: fPrice -g-product-final-price-258. Shouldn't ecomm_totalvalue take info from this class? I tried reading Help pages from google but they are soooo confusing, i cannot understand them.

If anyone would help me with this i would be very grateful.

Thanks

I would like call google ads API with django application and I am unable to find refresh_token

I am using below code

credentials = { 'developer_token': 'xxxx', 'refresh_token': '', 'client_id': 'xxx.apps.googleusercontent.com', 'client_secret': 'xxx'}

adwords_client = GoogleAdsClient.load_from_dict(credentials) 

And getting below code in django

('invalid_request: Missing required parameter: refresh_token', '{\n "error": "invalid_request",\n "error_description": "Missing required parameter: refresh_token"\n}')