Skip to main content

4. Geo Detection on AMP

Use the amp-geo component when you are looking to only load Privacy Manager in a limited number of countries. Console generates a code snippet that can be used to configure the geo targeting restrictions you wish to apply.

Tip

For more information on amp-geo, check out the AMP documentation here.

To implement geo targeting:

  1. Add the following amp-geo tag to the <body> section of the HTML on all your AMP pages:

    <amp-geo layout="nodisplay"></amp-geo>
  2. Add the following AMP geo detection library to the header of all your AMP pages:

    <script async custom-element="amp-geo" src="https://cdn.ampproject.org/v0/amp-geo-0.1.js"></script>
  3. From within the desired GDPR for Web configuration in Console, select the Admin tab.

    PM-Geo_Detection_in_Amp-Admin_tab.png
  4. In the Advanced Settings area, open the Geo-targeting section.

    PM-Geo_Detection_in_Amp-geo_targeting_section.png
  5. Select the "Choose countries" radio button and then edit the list of countries that you want to include or exclude.

    PM-Geo_Detection_in_Amp-selecting_countries.png
  6. Copy the geo targeting code snippet and paste it inside the amp-geo component on your pages.

    Here's an example of an amp-geo tag with the LiveRamp script implemented on the existing AMP webpage:

    PM-Geo_Detection_in_Amp-script_example.png

Your Privacy Manager configuration will now only load in the specified countries.