Google Ads connector reference
This article explains the advanced features of Google Ads connector.
Selecting the date range for a fetch
The selected date segment determines the date range you can choose for a data fetch. Because of the requirements of the Google Ads API, the date range needs to start and end on the first day of the selected date segment. Adverity automatically changes the date range of the fetch to be compatible with this requirement. For example, if you select a custom date range of 15 March - 15 April with a monthly date segment, Adverity modifies the time range to 1 March - 1 April, and collects data for the months of March and April. To collect data for the month of March only, select a date range of 1 March - 1 March.
Calculating impression share and related metrics
The Google Ads connector returns some metrics as percentages (including impression share). Percentages cannot be aggregated or combined. However, data returned as percentages can be further processed to make them ready for aggregation. For more information, see the Google documentation.
This section enables you to calculate potential impressions from the impression share metric. You can then transfer potential impressions to Explore & Present or other destinations and use this metric to calculate impression share percentages for any combination of dimensions.
Prerequisites
Before you complete the procedure in this guide, perform all of the following actions:
-
Create a Google Ads datastream. For more information, see Collecting data from Google Ads.
-
Apply the correct Data Mapping for your datastream. For more information, see Introduction to harmonizing data.
-
Make sure that your data extract contains the following fields:
-
Impressions
-
Search impression share
-
Search lost impression share (budget)
-
Search lost impression share (rank)
-
Procedure
To calculate potential impressions from the impression share metric, follow these steps:
-
Select the workspace you work with in Adverity and then, in the , click Datastreams.
-
In the Enrichments section, click + Add Enrichment.
-
Click Create a New Erichment.
-
Click Custom Script.
-
Click Source.
-
In the Edit Source Code window, replace the original code with the following:
[ [ "extendmissing", { "subtable": null, "fieldnames": [ "Search lost impression share (rank)", "Search lost impression share (budget)" ], "missing": "0.0", "_comment": null } ], [ "convertnumbers", { "fields": [ "Impressions", "Search impression share", "Search lost impression share (rank)", "Search lost impression share (budget)" ], "default": 0, "strict": false, "subtable": null, "locale": "en", "_comment": null } ], [ "addfieldx", { "index": null, "subtable": null, "field": "Potential impressions", "expression": "round({Impressions} / {Search impression share}) if {Search impression share} > 0 else '0'", "_comment": null } ], [ "addfieldx", { "index": null, "subtable": null, "field": "Lost impressions (budget)", "expression": "round({Potential impressions}*{Search lost impression share (budget)}) if {Search lost impression share (budget)} > 0 else '0'", "_comment": null } ], [ "addfieldx", { "index": null, "subtable": null, "field": "Lost impressions (rank)", "expression": "round({Potential impressions}*{Search lost impression share (rank)}) if {Search lost impression share (rank)} > 0 else '0'", "_comment": null } ] ]
-
Click Next and then click Create +.
-
Collect data for the datastream. For more information, see Collecting and viewing data.
-
In the Data Mapping.
, click
-
In the Source Fields column, find Potential impressions.
-
Click the cell in the Target fields column within the source row, type in potential_impressions and click + Create new.
-
In the Type field, select Float.
-
In Measure, select Sum.
-
Click Create.
-
Repeat the same procedure described in steps 11 to 15 for the following metrics:
-
Lost impressions (rank)
-
Lost impressions (budget)
The Data Mapping changes are saved automatically.
-
-
Collect data for the datastream. For more information, see Collecting and viewing data.
You can now transfer the Potential impressions, Lost impressions (rank) and Lost impressions (budget) metrics to any destination.
To visualize Potential impressions in Adverity's Explore & Present, follow the procedure described in Visualizing potential impressions.