# Installing with Google Tag Manager

### Create New Tag and install Uzera SDK snippet

1. Log in to your Google Tag Manager account and navigate to the desired container.
2. Click on the "Tags" tab and then click the "New" button.
3. Select "Custom HTML" as the tag type.
4. Give your tag a descriptive name. ie: Uzera&#x20;
5. In the "HTML" field, paste the Uzera SDK Snippet code for your custom tag.
6. Under "Triggering", select **All Pages**
7. Click "Save" to create your custom HTML tag.&#x20;
8. Publish your changes to make the tag live on your website.

<figure><img src="https://1535888196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbc2nibKwy27UEWgzIr5B%2Fuploads%2FA0QnkepT6qPDSbDhIO0r%2Fimage.png?alt=media&#x26;token=39b5e1b4-b4df-4acb-ace5-b68b29391b61" alt=""><figcaption></figcaption></figure>

*Note: You can modify triggering as per your requirement, but please note that* Uzera *can only show experiences wherever the code snippet is loaded.*

### Identify users

**How to Identify and send user properties to** Uzera **?**\
To show the right content to the right users at the right time, you must identify users with the "identify" event and send their data to Uzera.

It's requires to pass a "id" (YOUR\_USER\_ID), Name and Email to uzera() function as per the instructions below, you can leverage this information for better targeting and personalizing experiences.

1. In your GTM account, navigate to the "Tags" section and click "New".&#x20;
2. Choose "Custom HTML" as the tag type.
3. Copy and paste Uzera identify event snippet in HTML section
4. You will need to pass your user **id**, user **name** and user **email** as [variables in GTM](https://support.google.com/tagmanager/topic/9125128?sjid=9966693912806969768-AP) you can also pass additional information that you want to use for targeting to user for personalised experiences
5. Set trigger (Please trigger identify event as soon as user logged into your application)&#x20;
6. Give your tag a name and click "Save".

<figure><img src="https://1535888196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbc2nibKwy27UEWgzIr5B%2Fuploads%2FXd4n2jhv1vq52MsAZ9QS%2Fimage.png?alt=media&#x26;token=a6193c48-66df-4d54-824f-7844ae5074df" alt=""><figcaption></figcaption></figure>

We recommend passing as much information as possible about your users. The more data you provide, the better we can target and personalize the onboarding experience for each user.

### Events Tracking

By tracking events in your application, It's allow you to show Uzera's content based on what actions user have or haven't taken. This can also help you see how your content affects user behavior.&#x20;

1. In your GTM account, navigate to the "Tags" section and click "New".&#x20;
2. Choose "Custom HTML" as the tag type.&#x20;
3. Copy and paste Uzera Event Tracking snippet in HTML section&#x20;
4. You can also send additional data to Uzera with your custom event
5. Set [Custom event trigger](https://support.google.com/tagmanager/answer/7679219?hl=en)
6. Give your tag a name and click "Save".

You can use following event tracking code to track any custom event and send data to Uzera platform, you can modify this code as per your requirement

```html
<script>
uzera("track", {
  event: "Plan Upgrade", // Replace with your custom event name
  data: {
    // Replace with your custom event data
    plan: "Growth",
    term: "Monthly",
    price: 99,
    renewal_date: 1680000401,
  },
});
</script>
```
