> ## Documentation Index
> Fetch the complete documentation index at: https://help.privy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Privy with Google Tag Manager

> Install and manage your Privy code through Google.

For users who don't want to install the Privy Code manually or via a supported e-commerce platform, there is a way to install Privy by adding the code to Google Tag Manager (GTM). Utilizing a GTM container allows for the Privy code to be managed through Google and can make adding or removing Privy from multiple sites easier. 

## Considerations

Before you begin, please review the guidelines below. Using Google Tag Manager to install and manage your Privy code will result in the loss of some functionality. 

* If you've already installed Privy manually or through an integration, you should not also install Privy through Google Tag Manager. These methods are considered mutually exclusive. 

* If you install Privy through GTM, the following functionality will be lost within Privy versus installing through your e-commerce platform.

  * Google Analytics tracking for view and signup events will not function. 

  * Abandoned Cart and Purchase Follow-Up emails will not work with Privy installed via GTM.

  * Display Revenue will not be detected and displayed on your dashboard.

  * Cart Value, Product/Variant ID, and Order Count targeting for Convert displays and newsletter emails will not work.

## Copy the code

To manually install your code, you first need to copy it from your Privy account's settings:

* Navigate to the [Privy Code](https://dashboard.privy.com/settings/widget) page in your account's Settings.
* Locate and select the **Default** or **Asynchronous** tab to reveal its details. The default code is the preferred method to install Privy and will allow it to load in line with everything else on your site. Meanwhile, the asynchronous code will load Privy last.
* Copy the selected code.

<video autoPlay muted loop playsInline className="copy-privy-code" src="https://mintcdn.com/privy/FgROYLbT_pFyxYR7/new-images/integrations/locate-privy-code.mp4?fit=max&auto=format&n=FgROYLbT_pFyxYR7&q=85&s=2ff6db975d39d4cbed51e972c19b4a5a" data-path="new-images/integrations/locate-privy-code.mp4" />

## Install the code via Google Tag Manager

To install your Privy code with Google Tag Manager:

* In a new browser tab or window, log in to your [Google Tag Manager](https://marketingplatform.google.com/about/tag-manager/) account.

* Ensure you are in the proper *Workspace*. 

* In the left sidebar menu, navigate to **Tags** and click **New**.

* Name your tag by replacing the **Untitled Tag** at the top left of the pane.

<img height="200" alt="Screen recording showing how to create a new tag in Google Tag Manager" src="https://mintcdn.com/privy/Jffa8F8-oDakCvjD/images/integrations/gtm-create-tag.gif?s=a83c7e1994952ccf8eda29fa57765311" data-path="images/integrations/gtm-create-tag.gif" />

* Select the **Tag Configuration** area and choose **Custom HTML** for the Tag type.

* Paste the Privy code that you retrieved earlier into the *HTML* field.

* Below the *Tag Configuration* area, click **Triggering** to set up a firing rule. If you don't set up a firing rule, the tag will not fire, Privy Convert displays will not function, and Privy Analytics will not be collected.

* Select the **All Pages** (Page view) option for your trigger. 

* Click **Save** to save your new tag.

* In the upper right, click **Submit** to save your new tag and trigger. 

<img height="200" alt="Screen recording showing how to configure, save, and submit your new tag" src="https://mintcdn.com/privy/Jffa8F8-oDakCvjD/images/integrations/gtm-save-and-submit-tag.gif?s=b1c311fde5acb2407989c6fbd7818d14" data-path="images/integrations/gtm-save-and-submit-tag.gif" />

After submitting, you will have the option to give this version a name and description. You will want this version name and description to indicate the changes you are making to add the Privy Code to your GTM account to install the Privy app on your site. Once you have given your version a name and description, select the **Publish** button at the top right. 

<img height="200" alt="Screenshot showing how to publish your Privy installation via Google Tag Manager" src="https://mintcdn.com/privy/Jffa8F8-oDakCvjD/images/integrations/gtm-publish-changes.png?fit=max&auto=format&n=Jffa8F8-oDakCvjD&q=85&s=4b9f21c3a42920d5293712a94c71b941" data-path="images/integrations/gtm-publish-changes.png" />

Now, every time someone visits a page on your site (the trigger), the tag (Privy Code) will run so that your Privy Convert displays appear to visitors and analytics are collected.
