This page offers comprehensive instructions for implementing the InMobi CMP on a website using Google Tag Manager (GTM). This process uses a custom HTML GTM tag and additional GTM variables and triggers/trigger groups. Before finalizing your GTM setup, complete the site and consent configurations.
- You have an InMobi CMP account with your website added and configured.
- The website where InMobi CMP will be added has GTM installed.
- This guide assumes that you import the provided GTM container file into your GTM environment to import the custom HTML tag and necessary variables and example triggers. (For help on Variables, check out our Variables Guide.) It is recommended that you import & merge the provided container into your existing container, creating a new workspace; see the instructions below.
Add Choice with GTM (JSON Container Import)
Importing the GTM InMobi Choice TCFv2 container is the most reliable way to add the custom HTML tag, all of the necessary variables, and sample triggers you can use to configure your container for consent management easily.
Download the GTM Container Import - Tag and Variables. Store it in a local directory on your computer.
- On the Google Tag Manager user interface, click Admin in the top navigation.
- In the Container column, click Import Container.
- In the view that opens, click Choose container file.
- In the file selector, browse the GTM-CONTAINER-IMPORT.json file in your local directory and select it for importing.
- Choose to create a New workspace with the import or to merge it into an Existing workspace. It is recommended to create a new workspace for this import.
- In the overlay that opens, give the workspace a descriptive name.
- Click Save in the top right corner to save the new workspace.
- Choose Merge as the import option, and select Overwrite conflicting tags, triggers, and variables.
- Verify that the import options are all fine. You can click View detailed changes to see what will happen when you confirm the integration.
- Click Confirm when ready to import the container to the new workspace you created.
You have now added all the necessary tags, triggers, and variables to get you started. You will have to configure some variables, and you will have to create new triggers to enable consent management in the container. The next chapter will explain this process in more detail.
InMobi CMP GTM Configuration
Here are the steps you need to take to configure the InMobi CMP web tag, and to create and modify the triggers and variables you’ll need for the integration to work.
- Set the InmobiChoice - UTID constant value. Browse Variables in your container, and open up the InmobiChoice - UTID variable. Set the value to your UTID (pCode).
- If subdomains are not selected, this value is False by default. Otherwise, a valid domain should be entered.
Enable CCPA Support
- You must have CCPA enabled on the website add at choice.inmobi.com/protect.
- You need an html container with a unique ‘id’ attribute set (likely in the footer) where the CCPA message will be appended to on the page.
- You can learn more about the html id attribute here.
- Add the InmobiChoice - CCPA msg id constant value. This is the html id of the footer dom element where the CCPA message/popup link will be appended. (See the explanation above about how to find/get an HTML id attribute).
- Set the InmobiChoice - CCPA constant to true to enable, false to disable.
- If CCPA is successfully enabled on your website you will see the CCPA msg with a link Do Not Sell My Data link in the footer (or wherever your html id div from step 2 a is located on the page).
- When clicking on the Do Not Sell My Data link in the CCPA footer message a modal should pop up.
Push consent signals to the data layer
Set the InmobiChoice DataLayer Push constant to true to automatically push consent signals for IAB Vendors, Non-IAB Vendors, Legitimate Interests, and Publisher Consents.