Google Ad Manager (GAM)
If you currently use Google Ad Manager (GAM) with your website, AdsPostX can be integrated within just a few steps which are outlined below.
- Your JS SDK snippet (which you can obtain following the steps here)
- Access to your Google Ad Manager account
- Information on the page link/URL structure of your site's order confirmation page (or wherever you intend to display the AdsPostX unit)
You will need to set up a third-party creative within GAM to implement AdsPostX. Below is a step-by-step guide to accomplish this.
- In Google Ad Manager, select Delivery > Creatives
- Under the Display creatives tab, click New Creative
- Select your advertiser, then click Third party
- Enter a Name for your creative. For example, AdsPostX – banner – 1x1 - 1
- Enter a Target ad unit size of 1x1. This allows the creative to serve on all inventory sizes
- Select Standard for Code type
- Paste the JS SDK snippet into the Standard field
- Click Save
For more information on setting up third-party creatives, check out this Google Ad Manager support article.
In order to pass payload values with a GAM-driven implementation of AdsPostX, there are two options available:
- Declare the payload object prior to loading AdsPostX via GAM
- Set payload values and refresh the AdsPostX unit afterwards
First, determine which payload values you would like to pass. Then declare using the following code snippet:
Replace customAttribute with any attribute(s) you would like to pass into the AdsPostX payload object along with the corresponding value.
Use the following snippet to set multiple payload attributes at once.
Note that when a payload attribute is set, it overwrites any existing value for that attribute.
For example, if both the above snippets are used, the final value for the payload attribute customAttribute would be set to newValue.
If GAM loads AdsPostX and you would like to pass payload values afterwards, follow this guide to prevent AdsPostX loading on initialization and then set payload values and refresh/display the unit.
The AdsPostX JS SDK Snippet that is provided displays the AdsPostX at run-time. Set autoLoad: false to suppress this such that payload values can be added on page load. You may then "call" the unit to launch the unit with window.Adpx.refresh();