{"id":418,"date":"2017-02-15T23:53:13","date_gmt":"2017-02-15T22:53:13","guid":{"rendered":"https:\/\/ppc-scripts.eu\/?p=418\/"},"modified":"2017-02-22T11:57:52","modified_gmt":"2017-02-22T10:57:52","slug":"adwords-script-for-better-ab-testing-of-ads","status":"publish","type":"post","link":"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/","title":{"rendered":"Adwords script for better A\/B testing of Ads"},"content":{"rendered":"<p>This script is really useful for long term ad A\/B testing for bigger accounts.<\/p>\n<p>Key functions:<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li>Track changes or additions to the Ad Group and calculate statistical significance for A\/B testing from a specific date. You can see the date range for each test in the Dates list.<\/li>\n<li>Once the test has reached at least 95% significance, and the Ad Group has 2 or more ads, more than 50 clicks, and 500 impressions for the test period, you will find a list of the Ad Groups which are finished testing in the Results sheet.<\/li>\n<li>If\/when you make any changes to the ads in the Ad Group (pausing an ad or creating a new one), the script will automatically detect the change and start gathering new data on the day the change is made.<\/li>\n<li>If the Results sheet is empty, then the A\/B tests are still running and there are no results currently available.<\/li>\n<\/ol>\n<p><!--more--><\/p>\n<p>What you should know:<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li>The script isn\u2019t limited to A\/B testing only 2 ads in an Ad Group, you can also use it for Dynamic remarketing or banners. But you must have the same dimensions for each banner in one Ad Group, because the script is not designed to compare banners of different size.<\/li>\n<li>You must make sure to have the \u201cRotate evenly\/indefinitely\u201c setting selected so that every ad in the Ad Group will get the same amount of impressions.<\/li>\n<\/ol>\n<p>How to set up the script:<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li>Create new spreadsheet in your Google Drive.<\/li>\n<li>Insert the URL of your spreadsheet in line 1 of the script inside the brackets.<\/li>\n<li>Authorize the script and then preview it.<\/li>\n<li>Wait for the script to finish. Then go to the Dates list spreadsheet and change the date according to your needs, we recommend 7 to 10 days in the past. The script will begin tracking your changes the first time you use it, so initially, you won\u2019t have access to the account history.<\/li>\n<li>When you change the dates for each Ad Group you should rerun the script.<\/li>\n<li>Look at the Results list, where you A\/B test results will appear when they have finished.<\/li>\n<li>Then go to the Ad Group that has finished testing and create a new test. The best way to do this is to pause the ad which lost and create a new competitor for the winning ad.<\/li>\n<li>The next day, the Ad Group where you started a new test will disappear from the Results list because the new test is running.<\/li>\n<li>If the Results list is clear there is no Ad Group with at least a 95 % accuracy for test results.<\/li>\n<li>You can run A\/B tests like this on thousands of Ad Groups.<\/li>\n<\/ol>\n<pre class=\"wrap:false minimize:false lang:js decode:true\" title=\"Script for download\">\r\nvar SPREADSHEET_URL = '';\r\nvar DATA_FOLDER = '_adwords_data';\r\nvar DATA_FILE = 'ad-abtest-snapshot';\r\n \r\n \r\nfunction main() {\r\n  var account = AdWordsApp.currentAccount();\r\n  var tz = account.getTimeZone();\r\n  \r\n  DATA_FILE = DATA_FILE + \"-\" + account.getCustomerId();\r\n \r\n  var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);\r\n  var source_sheet = lynt_create_or_get_sheet(spreadsheet, \"Dates\", 1);\r\n  var export_sheet = lynt_create_or_get_sheet(spreadsheet, \"Results\", 2);\r\n  var adGroupWithOneAd = lynt_create_or_get_sheet(spreadsheet, \"Only one Ad\", 3)\r\n  \r\n  var lastModifications = getLastModifications(source_sheet, tz);\r\n  \r\n  var currentSnapshot = getCurrentSnapshot();\r\n  \r\n  var today = resetTimezone(new Date(), tz);\r\n  today.setHours(0);\r\n  today.setMinutes(0);\r\n  today.setSeconds(0);\r\n  today.setMilliseconds(0);\r\n  \r\n  for (var campaignId in currentSnapshot) {\r\n    if (!currentSnapshot.hasOwnProperty(campaignId)) {\r\n      continue;\r\n    }\r\n    \r\n    var currCampaignSnapshot = currentSnapshot[campaignId];\r\n    var prevCampaignSnapshot = getPreviousSnapshot(campaignId);\r\n    \r\n    for (var groupId in currCampaignSnapshot.groups) {\r\n      if (!currCampaignSnapshot.groups.hasOwnProperty(groupId)) {\r\n        continue;\r\n      }\r\n      \r\n      var currGroupSnapshot = currCampaignSnapshot.groups[groupId];\r\n      currGroupSnapshot.ads = JSON.stringify(currGroupSnapshot.ads);\r\n      var prevGroupSnapshot = prevCampaignSnapshot ? prevCampaignSnapshot.groups[groupId] : null;\r\n      \r\n      var change;\r\n      if (prevGroupSnapshot) {\r\n        change = prevGroupSnapshot.ads != currGroupSnapshot.ads;\r\n      } else {\r\n        change = true;\r\n      }\r\n      \r\n      if (!lastModifications[groupId] || change) {\r\n        lastModifications[groupId] = {\r\n          campaignName: currCampaignSnapshot.name,\r\n          groupName: currGroupSnapshot.name,\r\n          lastChange: lynt_getDateNDaysBack(7)\r\n        };\r\n      }\r\n      \r\n      if (prevGroupSnapshot) {\r\n        delete prevCampaignSnapshot.groups[groupId];\r\n      }\r\n    }\r\n    \r\n    if (prevCampaignSnapshot) {\r\n      for (var groupId in prevCampaignSnapshot.groups) {\r\n        if (prevCampaignSnapshot.groups.hasOwnProperty(groupId)) {\r\n          currCampaignSnapshot.groups[groupId] = prevCampaignSnapshot.groups[groupId];\r\n        }\r\n      }\r\n    }\r\n  }\r\n  \r\n  saveLastModifications(source_sheet, lastModifications);\r\n  for (var campaignId in currentSnapshot) {\r\n    if (currentSnapshot.hasOwnProperty(campaignId)) {\r\n      saveCurrentSnapshot(campaignId, currentSnapshot[campaignId]);\r\n    }\r\n  }\r\n  \r\n  var labelSel = AdWordsApp.labels()\r\n  \t.withCondition(\"Name = 'Winner'\");\r\n  var labelIt = labelSel.get();\r\n  if (labelIt.totalNumEntities() == 0) {\r\n    AdWordsApp.createLabel(\"Winner\", \"Winner Ad\", \"#ADFF2F\");\r\n  }\r\n  \r\n  var deleteLabel = AdWordsApp.ads()\r\n    .withCondition(\"LabelNames = 'Winner'\")\r\n      var labeledAds = deleteLabel.get();\r\n      while(labeledAds.hasNext()) {\r\n        var labeledAdIterator = labeledAds.next();\r\n        labeledAdIterator.removeLabel(\"Winner\");\r\n      }\r\n   var delAdGroupLabel = AdWordsApp.adGroups()\r\n    .withCondition(\"LabelNames = 'Winner'\")\r\n      var labelAdGroups = delAdGroupLabel.get();\r\n      while(labelAdGroups.hasNext()) {\r\n        var labeledAdGroupIterator = labelAdGroups.next();\r\n        labeledAdGroupIterator.removeLabel(\"Winner\");\r\n      }\r\n  \r\n  export_sheet.clear();\r\n  export_sheet.getRange(1, 1, 1, 3).setValues([\r\n    [\"Campaign\", \"Ad Group\", \"Impressions of Ad Group\"]\r\n  ]);\r\n  adGroupWithOneAd.clear();\r\n  adGroupWithOneAd.getRange(1, 1, 1, 3).setValues([\r\n    [\"Campaign\", \"Ad Group\", \"Impressions of Ad Group\"]\r\n  ]);\r\n  \r\n  var yesterday = lynt_get_date(1);\r\n  var lastChangeAWQL;\r\n \r\n  var all_ads = [];\r\n  for(var groupId in lastModifications) {\r\n    var group = lastModifications[groupId];\r\n    \r\n    lastChangeAWQL = lynt_date_format(group.lastChange);\r\n    if (lastChangeAWQL >= yesterday) {\r\n      continue;\r\n    }\r\n    \r\n    var adSelector = AdWordsApp\r\n     .ads()\r\n     .withCondition(\"CampaignName =\"+\"'\"+group.campaignName+\"'\")\r\n     .withCondition(\"AdGroupName =\"+\"'\"+group.groupName+\"'\")\r\n     .withCondition(\"Status = ENABLED\")\r\n     .forDateRange(lastChangeAWQL, yesterday)\r\n     .orderBy(\"Impressions DESC\")\r\n     .withLimit(2);\r\n    \r\n    var groupAds = [];\r\n \r\n    var adIterator = adSelector.get();\r\n    if (adIterator.totalNumEntities() < 2) {     \r\n      while(adIterator.hasNext()) {\r\n       var ad = adIterator.next();\r\n       var stats = ad.getStatsFor(lynt_date_format(group.lastChange),lynt_get_date(1));\r\n       adGroupWithOneAd.appendRow([ad.getCampaign().getName(),ad.getAdGroup().getName(),stats.getImpressions()]);\r\n      }\r\n      continue;\r\n    }\r\n      \r\n    while (adIterator.hasNext()) {\r\n     var ad = adIterator.next();\r\n         var stats = ad.getStatsFor(lynt_date_format(group.lastChange),lynt_get_date(1));\r\n         var ad_for_adgroup = [ad.getId(),ad.getAdGroup().getName(),ad.getAdGroup().getId(),stats.getImpressions(), stats.getClicks()];\r\n         groupAds.push(ad_for_adgroup);\r\n     }\r\n     all_ads.push(groupAds);\r\n    }\r\n  for(a = 0; a< all_ads.length; a ++) { if(winner(all_ads[a][0][3],all_ads[a][0][4],all_ads[a][1][3],all_ads[a][1][4],95)==1 &#038;&#038; all_ads[a][0][3]+all_ads[a][1][3]>500 && all_ads[a][0][4]+all_ads[a][1][4]>50) {\r\n      var adSelector = AdWordsApp\r\n      .ads()\r\n      .withIds([[all_ads[a][0][2],all_ads[a][0][0]]])\r\n \r\n      var adIterator = adSelector.get();\r\n      while (adIterator.hasNext()) {\r\n      var ad = adIterator.next();\r\n        export_sheet.appendRow([ad.getCampaign().getName(),ad.getAdGroup().getName(),all_ads[a][0][3]+all_ads[a][1][3]]);\r\n        ad.applyLabel(\"Winner\");\r\n        ad.getAdGroup().applyLabel(\"Winner\");\r\n      }\r\n \r\n   } else if(winner(all_ads[a][0][3],all_ads[a][0][4],all_ads[a][1][3],all_ads[a][1][4],95)==2 && all_ads[a][0][3]+all_ads[a][1][3]>500 && all_ads[a][0][4]+all_ads[a][1][4]>50) {\r\n      var adSelector = AdWordsApp\r\n       .ads()\r\n       .withIds([[all_ads[a][1][2],all_ads[a][1][0]]])\r\n \r\n      var adIterator = adSelector.get();\r\n      while (adIterator.hasNext()) {\r\n       var ad = adIterator.next();\r\n       export_sheet.appendRow([ad.getCampaign().getName(),ad.getAdGroup().getName(),all_ads[a][0][3]+all_ads[a][1][3]]);\r\n       ad.applyLabel(\"Winner\");\r\n       ad.getAdGroup().applyLabel(\"Winner\");\r\n      }\r\n   } else {\r\n      continue;\r\n \r\n   }\r\n }\r\n export_sheet.sort(3, ascending=false);\r\n adGroupWithOneAd.sort(3, ascending=false);\r\n  \r\n}\r\n \r\nfunction getCurrentSnapshot() {\r\n  var snapshot = {};\r\n  \r\n  var adsSel = AdWordsApp.ads()\r\n  \t.withCondition(\"Status = ENABLED AND AdGroupStatus = ENABLED AND CampaignStatus = ENABLED\")\r\n  \t.orderBy(\"Headline ASC\");\r\n  var adsIt = adsSel.get();\r\n  while (adsIt.hasNext()) {\r\n    var ad = adsIt.next();\r\n    var campaign = ad.getCampaign();\r\n    var campaignId = ad.getCampaign().getId();\r\n    var group = ad.getAdGroup();\r\n    var groupId = group.getId();\r\n    \r\n    if (!snapshot[campaignId]) {\r\n      snapshot[campaignId] = {\r\n        'name': campaign.getName(),\r\n        'groups': {}\r\n      };\r\n    }\r\n    var campSnapshot = snapshot[campaignId];\r\n    if (!campSnapshot.groups[groupId]) {\r\n      campSnapshot.groups[groupId] = {\r\n        'name': group.getName(),\r\n        'ads': []\r\n      };\r\n    }\r\n    var adSnapshot = {\r\n      'headline': ad.getHeadline(),\r\n      'line1': ad.getDescription1(),\r\n      'line2': ad.getDescription2()\r\n    };\r\n    campSnapshot.groups[groupId].ads.push(adSnapshot);\r\n  }\r\n  \r\n  return snapshot;\r\n}\r\n  \r\nfunction getPreviousSnapshot(campaignId) {\r\n  return lynt_store_load(DATA_FOLDER, DATA_FILE + '-' + campaignId + '.json');\r\n}\r\n \r\nfunction saveCurrentSnapshot(campaignId, currentSnapshot) {\r\n  lynt_store_save(DATA_FOLDER, DATA_FILE + \"-\" + campaignId + \".json\", currentSnapshot);\r\n}\r\n \r\n\/**\r\n * Get the date of last modification.\r\n *\/\r\nfunction getLastModifications(overviewSheet, tz) {\r\n  var lastRow = overviewSheet.getLastRow();\r\n  var lastCol = overviewSheet.getLastColumn();\r\n  if (lastRow > 1 && lastCol >= 4) {\r\n    var data = overviewSheet.getRange(2, 1, lastRow, 4).getValues();\r\n    var changes = {};\r\n    for (var r = 0; r < data.length; r++) { var row = data[r]; if (row.length > 3 && row[0] && row[3]) {\r\n        changes[row[0]] = {\r\n          campaignName: row[1],\r\n          groupName: row[2],\r\n          lastChange: resetTimezone(row[3], tz)\r\n        };\r\n      }\r\n    }\r\n    return changes;\r\n  }\r\n  else {\r\n    return {};\r\n  }\r\n}\r\n \r\n \r\n\/**\r\n * Saves last modifications to spreadsheets.\r\n *\/\r\nfunction saveLastModifications(overviewSheet, changes) {\r\n  overviewSheet.clear();\r\n  var data = [\r\n        ['ID', 'Campaign name', 'Adgroup name', 'Last change']\r\n    ];\r\n  for (var groupId in changes) {\r\n    if (changes.hasOwnProperty(groupId)) {\r\n      var groupChangeInfo = changes[groupId];\r\n      data.push([\r\n        groupId,\r\n        groupChangeInfo.campaignName,\r\n        groupChangeInfo.groupName,\r\n        groupChangeInfo.lastChange.toISOString().substr(0, 10)\r\n      ]);\r\n    }\r\n  }\r\n  var dataRange = overviewSheet.getRange(1, 1, data.length, data[0].length);\r\n  dataRange.setValues(data);\r\n  for (var i = 1; i <= 4; i++) { overviewSheet.autoResizeColumn(i); } } function lynt_get_date(pocet_dni) { var dnes = new Date(); var minule = new Date(); minule.setTime(dnes.getTime() - (1000 * 60 * 60 * 24 * pocet_dni)); return minule.getFullYear()+(\"0\"+(minule.getMonth()+1)).slice(-2)+(\"0\"+minule.getDate()).slice(-2); } function lynt_date_format(date) { var datum = new Date(); datum.setTime(date.getTime()); return datum.getFullYear()+(\"0\"+(datum.getMonth()+1)).slice(-2)+(\"0\"+datum.getDate()).slice(-2); } function cnormdist(x) { b1 = 0.319381530; b2 = -0.356563782; b3 = 1.781477937; b4 = -1.821255978; b5 = 1.330274429; p = 0.2316419; c = 0.39894228; if(x >= 0.0) {\r\n      t = 1.0 \/ ( 1.0 + p * x );\r\n      return (1.0 - c *  Math.exp( -x * x \/ 2.0 ) * t *\r\n      ( t *( t * ( t * ( t * b5 + b4 ) + b3 ) + b2 ) + b1 ));\r\n  }\r\n  else {\r\n      t = 1.0 \/ ( 1.0 - p * x );\r\n      return ( c *  Math.exp( -x * x \/ 2.0 ) * t *\r\n      ( t *( t * ( t * ( t * b5 + b4 ) + b3 ) + b2 ) + b1 ));\r\n  }\r\n}\r\n \r\nfunction winner(impressionA,clicksA,impressionB,clicksB,probability){\r\n  var ctrA = clicksA\/impressionA;\r\n  var ctrB = clicksB\/impressionB;\r\n  var errA = Math.sqrt(ctrA*(1-ctrA)\/impressionA);\r\n  var errB = Math.sqrt(ctrB*(1-ctrB)\/impressionB);\r\n \r\n  var p = cnormdist((ctrA-ctrB)\/Math.sqrt(errA*errA+errB*errB));    \r\n \r\n  if(p>probability\/100) {\r\n    \/\/Logger.log(\"A is the winner \"+Math.round(p*1000)\/10+\"%\")\r\n    return 1;\r\n   \r\n  } else if(p<1-probability\/100) {\r\n    \/\/Logger.log(\"B is the winner \"+Math.round((1-p)*1000)\/10+\"%\");\r\n    return 2;\r\n  } else {\r\n    return 3;    \r\n  }\r\n}\r\n \r\n \r\n \r\n\/*** Utility functions: common library. ***\/\r\n \r\nfunction lynt_store_save(dataFolderName, fileName, object) {\r\n  var objectJson = JSON.stringify(object);\r\n  var dataFolder = lynt_get_data_folder(dataFolderName);\r\n  var files = dataFolder.getFilesByName(fileName);\r\n  var dataFile;\r\n  if (files.hasNext()) {\r\n    dataFile = files.next();\r\n    dataFile.setContent(objectJson);\r\n  }\r\n  else {\r\n    dataFolder.createFile(fileName, objectJson, \"application\/json\");\r\n  }\r\n  return true;\r\n}\r\n \r\nfunction lynt_store_load(dataFolderName, fileName) {\r\n  var dataFolder = lynt_get_data_folder(dataFolderName);\r\n  var files = dataFolder.getFilesByName(fileName);\r\n  var dataFile;\r\n  if (files.hasNext()) {\r\n    dataFile = files.next();\r\n  }\r\n  if (dataFile) {\r\n    var objectJson = dataFile.getBlob().getDataAsString(\"UTF-8\");\r\n    return JSON.parse(objectJson);\r\n  }\r\n  else {\r\n    return null;\r\n  }\r\n}\r\n \r\nfunction lynt_get_data_folder(dataFolderName) {\r\n  var root = DriveApp.getRootFolder();\r\n  var folders = root.getFoldersByName(dataFolderName);\r\n  var dataFolder;\r\n  if (folders.hasNext()) {\r\n    dataFolder = folders.next();\r\n  }\r\n  else {\r\n    dataFolder = root.createFolder(dataFolderName);\r\n  }\r\n  return dataFolder;\r\n}\r\n \r\nfunction lynt_getDateNDaysBack(nDays) {\r\n  var date = resetTimezone(new Date());\r\n  date.setHours(0);\r\n  date.setMinutes(0);\r\n  date.setSeconds(0);\r\n  date.setMilliseconds(0);\r\n  var time = date.getTime();\r\n  time = time - 86400000 * nDays;\r\n  date.setTime(time);\r\n  return date;\r\n}\r\n \r\nfunction lynt_formatDateAWQL(date) {\r\n  return date.toISOString().substr(0, 10).replace(\/-\/g, '');\r\n}\r\n \r\nfunction resetTimezone(date, timezone) {\r\n  var tzOffset = parseInt(Utilities.formatDate(date, timezone, \"Z\").substr(0, 3), 10) * 60 * 60 * 1000;\r\n  var srcOffset = date.getTimezoneOffset() * 60 * 1000;\r\n  var time = date.getTime();\r\n  time += (tzOffset + srcOffset);\r\n  date.setTime(time);\r\n  return date;\r\n}\r\n \r\nfunction lynt_create_or_get_sheet(spreadsheet, name, position) {\r\n  var sheet = spreadsheet.getSheetByName(name);\r\n  if (sheet == null) {\r\n    sheet = spreadsheet.insertSheet(name, position);\r\n  }\r\n  return sheet;\r\n}\r\n \r\nfunction lynt_remove_empty_sheets(spreadsheet) {\r\n  var sheets = spreadsheet.getSheets();\r\n  for (var i = 0; i < sheets.length; i++) {\r\n    if (sheets[i].getLastRow() == 0) {\r\n      spreadsheet.deleteSheet(sheets[i]);\r\n    }\r\n  }\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This script is really useful for long term ad A\/B testing for bigger accounts. Key functions: Track changes or additions to the Ad Group and calculate statistical significance for A\/B testing from a specific date. You can see the date range for each test in the Dates list. Once the test has reached at least [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Adwords script for better A\/B testing of Ads - PPC Scripts<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adwords script for better A\/B testing of Ads - PPC Scripts\" \/>\n<meta property=\"og:description\" content=\"This script is really useful for long term ad A\/B testing for bigger accounts. Key functions: Track changes or additions to the Ad Group and calculate statistical significance for A\/B testing from a specific date. You can see the date range for each test in the Dates list. Once the test has reached at least [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/\" \/>\n<meta property=\"og:site_name\" content=\"PPC Scripts\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/LyntServices\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-15T22:53:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-02-22T10:57:52+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@JKasparu\" \/>\n<meta name=\"twitter:site\" content=\"@JKasparu\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jakub Ka\u0161par\u016f\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ppc-scripts.eu\/#website\",\"url\":\"https:\/\/ppc-scripts.eu\/\",\"name\":\"PPC Scripts\",\"description\":\"by Lynt services\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ppc-scripts.eu\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/#webpage\",\"url\":\"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/\",\"name\":\"Adwords script for better A\/B testing of Ads - PPC Scripts\",\"isPartOf\":{\"@id\":\"https:\/\/ppc-scripts.eu\/#website\"},\"datePublished\":\"2017-02-15T22:53:13+00:00\",\"dateModified\":\"2017-02-22T10:57:52+00:00\",\"author\":{\"@id\":\"https:\/\/ppc-scripts.eu\/#\/schema\/person\/9ea7ad2ac6d3dbecb6e5510875f97e1d\"},\"breadcrumb\":{\"@id\":\"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ppc-scripts.eu\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adwords script for better A\/B testing of Ads\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ppc-scripts.eu\/#\/schema\/person\/9ea7ad2ac6d3dbecb6e5510875f97e1d\",\"name\":\"Jakub Ka\\u0161par\\u016f\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ppc-scripts.eu\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/36e28826d2e1787626a73ae42c796dca?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/36e28826d2e1787626a73ae42c796dca?s=96&d=mm&r=g\",\"caption\":\"Jakub Ka\\u0161par\\u016f\"},\"description\":\"\\u010c\\u00edm v\\u00edc dat v Excelu m\\u00e1\\u0161, tolikr\\u00e1t si Linkbuilder\",\"sameAs\":[\"http:\/\/lynt.cz\",\"https:\/\/twitter.com\/JKasparu\"],\"url\":\"https:\/\/ppc-scripts.eu\/en\/author\/jakub\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Adwords script for better A\/B testing of Ads - PPC Scripts","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/","og_locale":"en_US","og_type":"article","og_title":"Adwords script for better A\/B testing of Ads - PPC Scripts","og_description":"This script is really useful for long term ad A\/B testing for bigger accounts. Key functions: Track changes or additions to the Ad Group and calculate statistical significance for A\/B testing from a specific date. You can see the date range for each test in the Dates list. Once the test has reached at least [&hellip;]","og_url":"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/","og_site_name":"PPC Scripts","article_publisher":"https:\/\/www.facebook.com\/LyntServices","article_published_time":"2017-02-15T22:53:13+00:00","article_modified_time":"2017-02-22T10:57:52+00:00","twitter_card":"summary","twitter_creator":"@JKasparu","twitter_site":"@JKasparu","twitter_misc":{"Written by":"Jakub Ka\u0161par\u016f","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/ppc-scripts.eu\/#website","url":"https:\/\/ppc-scripts.eu\/","name":"PPC Scripts","description":"by Lynt services","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ppc-scripts.eu\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/#webpage","url":"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/","name":"Adwords script for better A\/B testing of Ads - PPC Scripts","isPartOf":{"@id":"https:\/\/ppc-scripts.eu\/#website"},"datePublished":"2017-02-15T22:53:13+00:00","dateModified":"2017-02-22T10:57:52+00:00","author":{"@id":"https:\/\/ppc-scripts.eu\/#\/schema\/person\/9ea7ad2ac6d3dbecb6e5510875f97e1d"},"breadcrumb":{"@id":"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ppc-scripts.eu\/en\/adwords-script-for-better-ab-testing-of-ads\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ppc-scripts.eu\/"},{"@type":"ListItem","position":2,"name":"Adwords script for better A\/B testing of Ads"}]},{"@type":"Person","@id":"https:\/\/ppc-scripts.eu\/#\/schema\/person\/9ea7ad2ac6d3dbecb6e5510875f97e1d","name":"Jakub Ka\u0161par\u016f","image":{"@type":"ImageObject","@id":"https:\/\/ppc-scripts.eu\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/36e28826d2e1787626a73ae42c796dca?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/36e28826d2e1787626a73ae42c796dca?s=96&d=mm&r=g","caption":"Jakub Ka\u0161par\u016f"},"description":"\u010c\u00edm v\u00edc dat v Excelu m\u00e1\u0161, tolikr\u00e1t si Linkbuilder","sameAs":["http:\/\/lynt.cz","https:\/\/twitter.com\/JKasparu"],"url":"https:\/\/ppc-scripts.eu\/en\/author\/jakub\/"}]}},"_links":{"self":[{"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/posts\/418"}],"collection":[{"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/comments?post=418"}],"version-history":[{"count":3,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/posts\/418\/revisions"}],"predecessor-version":[{"id":451,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/posts\/418\/revisions\/451"}],"wp:attachment":[{"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/media?parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/categories?post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/tags?post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}