Deploy the natural search field manually
If you use the Google tag to record Floodlight conversions, customer support will send a dc_natural_search
field to you. The field looks like this:
'dc_natural_search': {
'exclusion_parameters': [
'^foo[_]bar=qux$',
'^yes=no^'
],
'engines': {
'aol': '1;2;a',
'ask': '3;4;b',
'google': '5;6;c',
'msn': '7;8;d',
'yahoo': '9;0;e',
'yahoo_japan': '11;12;f'
}
}
For desktop pages
Get your webmaster to add this field to the global snippet on every page of your desktop site. When your webmaster is done, your site's global snippet will look like this:
<!--
Start of global snippet: Please do not remove
Place this snippet between the <head> and </head> tags on every page of your site.
-->
<!-- Google tag (gtag.js) - Google Marketing Platform -->
<script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag(
'config', 'DC-1234567', {
'dc_natural_search': {
'exclusion_parameters': [
'^foo[_]bar=qux$',
'^yes=no^'
],
'engines': {
'aol': '1;2;a',
'ask': '3;4;b',
'google': '5;6;c',
'msn': '7;8;d',
'yahoo': '9;0;e',
'yahoo_japan': '11;12;f'
}
}
});
</script>
<!-- End of global snippet: Please do not remove -->
For Accelerated Mobile Pages
If you use Accelerated Mobile Pages, you'll need to add this field to the Google tag on every page of your mobile site. When your webmaster is done, your site's Google tag will look like this:
<!-- Google tag (gtag) -->
<amp-analytics type="gtag" data-credentials="include">
<script type="application/json">
{
"configRewriter": {
"varGroups": {
"dns": {"enabled": true}
}
},
"vars": {
"gtag_id": "DC-1234567",
"config": {
"DC-1234567": {
"groups": "default",
"dc_natural_search": {
"exclusion_parameters": [
"^foo[_]bar=qux$",
"^yes=no^"
],
"engines": {
"aol": "1;2;a",
"ask": "3;4;b",
"google": "5;6;c",
"msn": "7;8;d",
"yahoo": "9;0;e",
"yahoo_japan": "11;12;f"
}
}
}
}
},
"triggers": {
}
}
</script>
</amp-analytics>
Use Google Tag Manager to deploy the natural search tag
Google Tag Manager makes it easy to manage tags from multiple Google sources, such as Google Analytics, Floodlight, etc. If you're using Google Tag Manager for your site, follow these steps to deploy the Search Ads 360 Natural Search tag:
- Go to google.com/tagmanager, sign in and access your site's container.
- If you haven't already created a custom variable that can generate a random number, enable the built-in random number variable:
- In the left navigation panel, click Variables.
- In the Utilities box, select Random number.
- Create a tag that is called on every page load:
- In the left navigation panel, click Tags.
- Click the New button.
- Replace Untitled tag with a name that's meaningful to you.
- For example, enter a natural search tag.
- On step 1 Choose product, click Custom HTML tag.
- On step 2 Configure tag:
- Paste the natural search tag from Search Ads 360 customer support into the HTML field.
- In the tag, set the value of the word parameter to {{Random Number}} or to the name of your custom variable that generates a random number.
- Click Continue
- On step 3 Fire on, click All pages.
- Click Save tag to save your new tag.
- Follow the standard publishing process for Google Tag Manager:
- Create a container version.
- Preview and debug the version.
- Publish the new version.
For each page load, the tag determines if the referrer is a natural search result. If the page was visited as the result of clicking a natural search result, the tag 'fires' and reports a natural search result.
Test the deployment from Google Tag Manager
If you used Google Tag Manager to deploy your tag, do the following to test the deployment:
- In a Chrome web browser, visit the Chrome Web Store and install the Google Tag Assistant.
- Visit your site through a natural search result.
- Use the Tag Assistant to check that the natural search tag has fired.
- Visit another page on your site without clicking a search result.
- Use the Tag Assistant to check that the natural search tag did not fire.