Google Ad Manager (GAM)
Overview
Google Ad Manager (GAM) provides a flexible way to integrate MomentScience into your website. This guide shows you how to create and implement a MomentScience creative in Google Ad Manager to display personalized offers on your website.
What you'll learn
- How to create a MomentScience creative in Google Ad Manager
- How to configure size and placement options
- How to pass payload data for enhanced targeting
- How to test and verify your implementation
Prerequisites
Before starting this integration, you need:
- Your MomentScience JS SDK snippet (found in the dashboard under Integration)
- Access to your Google Ad Manager account with creative creation permissions
- Knowledge of where you want to display MomentScience units on your website
Integration Steps
Step 1: Create a new creative in Google Ad Manager
- Navigate to Delivery > Creatives
- Under Display Creatives, click New Creative
- Select your advertiser from the dropdown menu
- Choose Third party as the creative type
Step 2: Configure the creative settings
- Enter a descriptive name for your creative
- Example: MomentScience - Banner - 1x1 - Homepage
- Set the Target ad unit size to 1x1
- This size provides universal compatibility across placements
- Select Standard for the Code type
- Paste your MomentScience JS SDK snippet in the code field:
- Click Save to create your creative
For additional details on setting up third-party creatives in Google Ad Manager, refer to the official Google Ad Manager support documentation.
Step 3: Test your implementation
- Use Google Ad Manager's Preview tool to test your creative
- Navigate to the page where the creative should display
- Verify that MomentScience content appears correctly
- Check the MomentScience dashboard to confirm impressions are being recorded
Advanced: Passing payload data
Enhance targeting by passing user data to MomentScience through the payload object. There are two methods to pass payload data when using Google Ad Manager:
Method 1: Set payload values before loading MomentScience
Add this code to your page before the GAM ad tag loads:
// Set a single payload value
window.AdpxUser = Object.assign(window.AdpxUser || {}, {
"email": "[email protected]"
});
// Or set multiple values at once
window.AdpxUser = Object.assign(window.AdpxUser || {}, {
"email": "[email protected]",
"firstname": "John",
"lastname": "Doe",
"amount": "99.95",
"currency": "USD"
});Method 2: Set payload values after MomentScience loads
- Modify your creative code in GAM to prevent auto-loading by setting autoLoad: false
- Add this code to your page where you want to set the payload and display the content:
// Set payload values
window.AdpxUser = {
"email": "[email protected]",
"firstname": "John",
"lastname": "Doe"
};
// Refresh the MomentScience unit to display with new payload
window.Adpx.refresh();When you set a payload attribute, it overwrites any existing value for that attribute. For example, if customAttribute is set to 'someValue' and later set to 'newValue', the final value will be 'newValue'.
Verification and troubleshooting
Verify your integration
- Verify impressions in your MomentScience reporting dashboard
- Test the integration across multiple browsers to ensure compatibility
Common issues and solutions
Issue | Possible cause | Solution |
|---|---|---|
Creative not displaying | Ad blocker interference | Test in an incognito window or with ad blockers disabled |
No MomentScience content | SDK ID is incorrect | Verify your SDK ID in the dashboard and update your creative |
Missing payload data | Payload object not defined correctly | Check that window.AdpxUser is properly defined before the SDK loads |
Content appears in wrong location | Ad unit placement issue | Review your GAM placement settings and website implementation |
Multiple units loading | Duplicate creatives or line items | Check for multiple instances of the MomentScience SDK on the page |
For assistance with your Google Ad Manager integration, Feel free to contact us at [email protected].๏ปฟ