Integration guide
Welcome to the HighVibes Media integration guide! This document provides a step-by-step approach to integrating our platform into your webpage. We offer two integration options: a basic integration and an integration for Google Ad Manager.
This guide will walk you through both, explaining what each attribute does, and how to ensure the integration works perfectly for your needs.
Table of contents
- Standard Integration Script
- Google Ad Manager Integration Script
- Explanation of Attributes
- Prebid Integration
- Sample Scripts
Integration Scripts
Update (May 2025):
We now recommend using our new JavaScript integration method for improved flexibility and future features.
The previous script tag integration remains fully supported and backwards compatible.
Please use the latest version if possible.
New Integration Script (Recommended)
Add the following JavaScript snippet to your webpage.
Replace the values for tagId
, gc
, gi
, and targetId
as needed:
<script>
!function(i){var a=window,e=i&&i.tagId,t=document;if(e){var d=a.HIGHVIBES_=a.HIGHVIBES_||{};d[e]=d[e]||{},d[e].config=i,d[e].initialized=!1;var n=t.createElement("script");n.async=!0,n.src="https://static.highvibes.media/libs/hia/hvm-integration.js",(t.head||t.body).appendChild(n)}else console.error("HIGHVIBES_: tagId missing")}
({
tagId: "xxxxxxx"
});
</script>
Steps to Implement:
- Place this
<script>
block in the<head>
or<body>
section of your webpage. - Replace the values with those provided by HighVibes Media.
- See Explanation of Attributes for details.
Previous Integration Script (Still Supported)
You can still use the previous script tag integration if you prefer:
<script
async
id="hvm-integration"
src="https://static.highvibes.media/libs/hia/hvm-integration.js"
data-tagId="xxxxxxx"
></script>
Both integration methods are fully supported and will continue to work.
Google Ad Manager integration
To integrate with Google Ad Manager (GAM) using our Highvibes script, follow the steps below.
For Creatives with dimension (No View Macro)
Use this version when you’re serving standard banner ads or in-page creatives.
<script>
!function(i){var a=window,e=i&&i.tagId,t=document;if(e){var d=a.HIGHVIBES_=a.HIGHVIBES_||{};d[e]=d[e]||{},d[e].config=i,d[e].initialized=!1;var n=t.createElement("script");n.async=!0,n.src="https://static.highvibes.media/libs/hia/hvm-integration.js",(t.head||t.body).appendChild(n)}else console.error("HIGHVIBES_: tagId missing")}
({
tagId: "xxxxxxx",
gc: "%%CLICK_URL_UNESC%%"
});
</script>
For Out-of-Page Creatives (With View Macro)
Use this version only for out-of-page units, such as interstitials, pop-ups, or floating ads.
<script>
!function(i){var a=window,e=i&&i.tagId,t=document;if(e){var d=a.HIGHVIBES_=a.HIGHVIBES_||{};d[e]=d[e]||{},d[e].config=i,d[e].initialized=!1;var n=t.createElement("script");n.async=!0,n.src="https://static.highvibes.media/libs/hia/hvm-integration.js",(t.head||t.body).appendChild(n)}else console.error("HIGHVIBES_: tagId missing")}
({
tagId: "xxxxxxx",
gc: "%%CLICK_URL_UNESC%%",
gi: "%%VIEW_URL_UNESC%%"
});
</script>
Important
Only use this version for out-of-page creatives. Using
VIEW_URL_UNESC
on in-page ads may lead to double-counting impressions.For more details, see the official Google Ad Manager documentation and out-of-page creatives
Steps to Implement
1. Open Google Ad Manager (GAM)
Navigate to your ad unit and open the Creative where you’d like to insert the Highvibes integration script.
2. Choose “Third-party” Creative Type
When creating or editing a creative, select the Third-party creative option.
3. Paste the Script
Paste the appropriate script (see examples above) directly into the code field of your third-party creative.
4. Update Your Tag ID
Replace the placeholder tagId: "xxxxxxx"
with the unique Tag ID we’ve provided you.
5. Understand the Macros / Use the Correct Version
These are Google Ad Manager macros and will be dynamically replaced during ad delivery.
gc
: Replaced by the click tracking URLgi
: Replaced by the view (impression) tracking URL
5. Disable SafeFrame
✅ Important: Ensure that SafeFrame is disabled for this creative. SafeFrame can prevent the script from executing correctly, blocking impression/click tracking.
By using this script with the correct macros, Google Ad Manager will accurately track clicks and impressions, ensuring proper ad reporting.
See Explanation of Attributes for additional script attributes
Setup requirements
To ensure the successful operation of the HighVibes Media integration script, please ensure the following conditions are met:
-
Avoid secure frames and safeframes
The integration script must not be placed in a secure frame or safeframe. These environments impose restrictions that prevent the script from executing correctly, leading to issues such as:
- Inability to fetch or render ads correctly.
- Restricted communication between the script and the webpage.
- Blocked access to necessary tracking and analytics functionality.
-
Script placement
The script can be placed in the
<head>
or<body>
section where you desire. -
Only one integration script per page
HighVibes Media supports only one integration script per website.
-
Only use IDs provided by HighVibes Media
IDs and placement names corresponds to your account in HighVibes Media.
Attributes
Attribute | Description |
---|---|
tagId | Holds your Placement ID in HighVibes Media platform. |
targetId | Corresponds to the DIV tag appended to the page where the creative scripts will be loaded. |
gc | (GAM only) A macro used for tracking clicks on ads. When the script runs, this macro is replaced with the correct URL by Google Ad Manager. |
gi | (GAM only) A macro used for tracking ad impressions (views). It gets replaced with the correct URL for tracking views. |
Prebid integration
We support being added as a bidder in your existing Prebid setup. Use the configuration snippet below to include us as a bidder.
Configuration Example:
{
"bidder": "appnexus",
"params": {
"member": -----,
"placementId": "xxxxxxx",
"usePaymentRule": false
}
}
Requirements:
-
Include AppNexus Bidder Adapter:
- Ensure the AppNexus bidder adapter is included in your Prebid library build.
- You can check Prebid’s documentation to verify the adapter is enabled in your configuration.
Adapter Info: https://docs.prebid.org/dev-docs/bidders/appnexus.html
-
Size Agreement:
- Ensure that our bid profile is included for the banner sizes we support or have agreed upon with your team. For instance, if we support
300x250
and320x50
, these sizes should be explicitly configured in your ad unit setup.
- Ensure that our bid profile is included for the banner sizes we support or have agreed upon with your team. For instance, if we support
Sample scripts
Please only use scripts and IDs provided by HighVibes Media.
Custom placement name
Use the targetId attribute to add the custom placement name. Only run 1 integration script on your page
<script>
!function(i){var a=window,e=i&&i.tagId,t=document;if(e){var d=a.HIGHVIBES_=a.HIGHVIBES_||{};d[e]=d[e]||{},d[e].config=i,d[e].initialized=!1;var n=t.createElement("script");n.async=!0,n.src="https://static.highvibes.media/libs/hia/hvm-integration.js",(t.head||t.body).appendChild(n)}else console.error("HIGHVIBES_: tagId missing")}
({
tagId: "xxxxxxx",
gc: "%%CLICK_URL_UNESC%%",
gi: "%%VIEW_URL_UNESC%%",
targetId: "hvm_floorad_mobile"
});
</script>