Google Tag Manager for Do Not Sell / Do Not Share

Have more questions? Submit a request

DataGrail allows the submission of opt-outs via multiple methods. One method is setting a cookie to allow you to prevent the insertion of tags.  For example, you may determine that you do not wish to have retargeting actions performed on opted-out users.


Customer Responsibilities

Customers should perform a Do Not Sell/Share analysis, identify tags that are likely to be implicated in data sales, and make updates to their Google Tag Manager (GTM) tags to detect users who completed Do Not Sell/Share requests. (You can find out more about the Do Not Sell/Share form and process here)


DataGrail Responsibilities

DataGrail will host the Do Not Sell/Share form for you and, per the customer Do Not Sell/Share analysis, set cookies as discussed above and/or synchronize state directly to Service Providers (discussed elsewhere).

DataGrail will set the ccpa_dnsmpi cookie, value, and lifetime when a consumer executes a request on the Do Not Sell/Share page. DataGrail will set the following values for the ccpa_dnsmpi cookie:

  • Cookie name: ccpa_dnsmpi

  • Value: true

  • Cookie lifetime: 10 years


Configuring GTM to Support DataGrail Opt Out Cookies

You can defer to an internal team that manages GTM on how best to configure this, but the steps below walk through one way to complete this;

Log in to and choose the appropriate Container

Identify Tags Implicated in Data Sales

  1. Select Tags from the left hand menu and work with your team to identify all tags associated with data sales.

    • Important: Keep a list of these as you will be updating them later in the instructions

Create ccpa_dnsmpi Variable

  1. Select Variables from the left hand menu and click New

  2. Click the Variable Configuration box and select 1st Party Cookie from the menu that opens

  3. Enter ccpa_dnsmpi as the name for the cookie and the variable and click Save

Create Triggers

  1. Select Triggers from the left hand menu and click New
  2. Click the Trigger Configuration box and select Page View or DOM Ready

    • Note: Your selection here will be based on the triggers your organization utilizes. If you utilize Page View triggers for the tags that are implicated in data sales, use Page View and vice versa. If you utilize both, then you will create two triggers. In the screenshots we will be utilizing a Page View trigger as an example.

  3. Select Some Page Views and set the event variables ccpa_dnsmpi, does not equal, and true
  4. Enter in an applicable name (e.g. Page View - No Opt-Out) and click save

Update Tags

  1. Select Tags from the left hand menu and select a Tag you have identified as implicated in data sales
  2. Click the Triggering section and then the “-” sign to remove the current trigger
  3. Click the Triggering box again and select the trigger you created in the previous step from the list
  4. Click Save

  5. Repeat steps 1-4 for all applicable tags. Ensure you are utilizing the correct trigger if you utilize both Page View and DOM Ready triggers for tags

Submit and Publish Changes

  1. Once you are complete with your changes, click Submit in the top right

  2. Provide a Version name and Description and click Publish in the top right


Please reach out to with any questions!


Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.

Articles in this section

Was this article helpful?
0 out of 0 found this helpful