Basic Implementation

Introduction 

This page includes step-by-step instructions for integrating the InMobi CMP Web Tag to obtain user consent before activating any tags on your websites. Ensure that you have completed site and consent configurations before tagging. 

Best Practices

  • The Web Tag operates asynchronously, and once consent is obtained, it does not interfere with the loading of other tags on your site. 
  • We recommend you trigger the CMP tag first in the header. This ensures you capture user consent before activating any vendor tags. 
  • Allowing tags to fire before a user's consent can expose your website to compliance risks. 
  • Delaying the loading of the CMP may result in timeout issues, such as IAB vendors being unable to retrieve the consent string in time. This can have a detrimental effect on revenue.

Implementation

Retrieve and Implement Your Tag

  1. After you add your sites, click the Web Tag button in the top right corner of the InMobi CMP portal. A modal appears containing the code snippet. You should use it on your website.

  2. When integrating the tag, copy and paste the complete tag into your site's header. Avoid making any modifications to the tag, as alterations may lead to the CMP functioning improperly.

  3. Upon successful implementation of your tag, you can expect consent metrics to commence populating within 1-2 days. Additionally, the status beacon will transition from orange to green.

Implement with Google Tag Manager

For Google Tag Manager support, see Google Tag Manager (GTM) Implementation.

Update Your Tag for IAB Europe’s CMP Domain Changeover

IAB Europe mandates the migration of CMP scripts from consensu.org subdomains. InMobi CMP has completed this. Publishers must update the consent domain to avoid audits and reminders from IAB Europe. Failure to make required changes may lead to website issues after consensu.org deprecation.

If you are a Publisher already using our InMobi CMP product please follow the steps below:

  1. After logging in to InMobi CMP portal, check the version number of the CMP.
  2. If the number displayed is less than forty-two (42) then you will need to upgrade. If the number is forty-two or higher or is shown as the Latest, you do not need to upgrade.
    • To upgrade, retrieve, and implement your tag as shown above on this page.
  3. Once completed successfully, customers should see version forty-two (42) (or the Latest) as the CMP version they are running for a given web property 

Confirming the Tag is Live

Callbacks are intended to be handled directly by the CMP through event listeners, as the calls to the CMP commands are intended to be resolved in a synchronous way. We recommend attaching asynchronous callbacks to the CMP through this method as it will be the source of information set up by the CMP at specific moments.

  • Asynchronous Consent String API - When implemented, can add the consent handler, then call the TC Data API to retrieve the string
  • CMP Ping - You can use the Ping once loaded to ensure the CMP is available to you.

Common Errors

Troubleshooting the CMP behavior using the developer console of a browser is the best way to ensure that the tag implementation is done correctly. Some of the common issues that can impact CMP prompt are listed below.

HTTP 403

  • Site is attempting to load the CMP configuration and errors out
    GET https://cmp.inmobi.com/choice/tVZtC4A8fAP1L/www.inmobi.com/choice.js?tag_version=V3
    

    Solution: Please ensure that the API call, like the example above, matches the same site URL you configured in the InMobi CMP Portal. Most common mistakes include:

    Entering domain.com in the CMP 'Site' portal when the site loads as www.domain.com (or vice versa) - be sure these match exactly and are lower-case.

  • Not enabling 'Apply to all my subdomains?' option when creating or editing sites
     

    Note

    When you select Apply to all my subdomains, you need to download the respective tag through the menu on the site entry in the site's table.

  • Not entering the exact 'accountId' or 'p-accountId'
     

    Copy it exactly since it is case-sensitive and does not include the 'p-' prefix.

  • Custom implementation invokes API to retrieve nonIAB vendor list
     

    Solution: Since the CMP handles the call to get non-IAB vendors by default, we do not recommend making edits to the tag to do so manually. If a developer intends to invoke this manually, they need to handle HTTP 403 error response returned when there are no non-IAB vendors listed for the account.

    GET https://cmp.inmobi.com/choice/tVZtC4A8fAP1L/www.domain.com/choice.js?tag_version=V3
    

On This Page

Last Updated on: 14 Feb, 2024