This topic offers comprehensive instructions for implementing the InMobi Choice TCFv2 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.
Assumptions
- You have an InMobi Choice account with your website added and configured.
- The website where Choice 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.
Things Needed
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 the Admin link 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 to the GTM-CONTAINER_qcchoice-tcfv2-import-with-ccpa-and-data-layer-push.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 exactly 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.
Choice GTM Configuration
Here are the steps you need to take to configure the Choice tag, and to create and modify the triggers and variables you’ll need for the integration to work.
- Set the QCChoice - UTID constant value. Browse to Variables in your container, and open up the QCChoice - 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.
- This html id can be anything you choose (valid html id value) as long as the container id (on the page) matches the QCChoice - CCPA msg id value in GTM. In the screenshot below the container in the footer of the website has the id of ‘choice-footer-msg’ and since we also set the value of QCChoice - CCPA msg id in GTM the CCPA footer message was appended to the container with JavaScript. You may need to have your dev team add an empty container (with a unique html id) to the footer of your website where the CCPA message can be appended.

- Add the QCChoice - 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 QCChoice - 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 QCChoice - DataLayer Push constant to true to automatically push consent signals for IAB Vendors, Non-IAB Vendors, Legitimate Interests, and Publisher Consents.