Google Ad Manager (GAM)
AdsPostX is now MomentScience! 🎉
We have rebranded AdsPostX to MomentScience. All the latest documentation and updates can now be found at MomentScience Documentation.
This guide simplifies the integration of AdsPostX with Google Ad Manager (GAM). Follow these steps for a quick and effective setup to enhance your website's advertising capabilities.
- Access to your Google Tag Manager account.
- Information on the page link/URL structure where you'll display the AdsPostX unit (e.g., order confirmation page)
- Navigate to Google Ad Manager and select Delivery > Creatives.
- Under Display Creatives, click "New Creative."
- Choose your advertiser and select "Third party."
- Enter a name for your creative (e.g., AdsPostX – banner – 1x1 - 1).
- Set the Target ad unit size size to 1x1 for universal compatibility.
- Select "Standard" for the Code type and paste the JS SDK snippet.
- Save your settings.
For additional guidance on setting up third-party creatives, refer to this Google Ad Manager support article.
To pass payload values with a GAM-driven implementation of AdsPostX, you have two options:
- Declare the payload object before loading AdsPostX via GAM
- Set payload values and refresh the AdsPostX unit afterward
- Determine the payload values you want to pass.
- Use the following code snippet to pass your payload, Just replace the customAttribute with the desired attribute(s) and value(s).
To set multiple payload attributes at once, use:
When a payload attribute is set, it overwrites any existing value for that attribute. For example, if both snippets are used, the final value for the payload attribute "customAttribute" would be set to "newValue".
To set payload values after AdsPostX is initialized via GAM, follow these steps:
- Modify the AdsPostX JS SDK Snippet to prevent AdsPostX from loading on initialization by setting autoLoad: false.
- This allows payload values to be added on page load.
- To launch the unit and refresh/display it with the updated payload values, call window.Adpx.refresh().
The AdsPostX JS SDK Snippet provided displays AdsPostX at run-time by default. To delay its display and add payload values on page load, set autoLoad: false. Afterwards, you can launch the unit with the updated payload values by calling window.Adpx.refresh().
📢 If you're running into any issues while going through the integration process, feel free to contact us at [email protected].