Posts under category google-ads-api

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}')

I need to export campaign statistics to .xlsx, which is stored in Google Drive. I substitute the link to this document in the script, and I get this error:

"Service Spreadsheets failed while accessing document with id 1S_rjqsgbjyTKXEo14j_m2xtoIwgHCFi1. (file Code.gs, line 18)".

In the privacy parameters of the document, "editing for everyone who has the link" is configured. How do I solve the problem? I tested these two links: https://docs.google.com/spreadsheets/d/1S_rjqsgbjyTKXEo14j_m2xtoIwgHCFi1/edit#gid=1649084583/ https://drive.google.com/file/d/1S_rjqsgbjyTKXEo14j_m2xtoIwgHCFi1/view?usp=sharing

Here is the script itself.

function main() {  //  var url = 'https://drive.google.com/file/d/1S_rjqsgbjyTKXEo14j_m2xtoIwgHCFi1/view?usp=sharing/';  var datasheet = 'Ali_web_all_acc_export.xlsx';  var columns = 'CampaignName, AdvertisingChannelType, Cost, Date';  var report = 'CAMPAIGN_PERFORMANCE_REPORT';  var selector = 'CampaignName DOES_NOT_CONTAIN "Шашлык15loooool"';  var during = 'YESTERDAY';  // Функция выгрузки  exportReportToSpreadsheet(url, datasheet, columns, report, selector, during); } function exportReportToSpreadsheet(url, datasheet, columns, report, selector, date) {  var spreadsheet = SpreadsheetApp.openByUrl(url);  var sheet = spreadsheet.getSheetByName(datasheet);  var report = AdWordsApp.report(    'SELECT ' + columns + ' ' +    'FROM ' + report + ' ' +    'WHERE ' + selector +' ' +    'DURING '+ date + ' '    );  report.exportToSheet(sheet); }