---
title: Browser Extension Authentication
slug: browser-extension-authentication
description: Learn how tracking codes (TC) play a crucial role in affiliate marketing, ensuring proper identification and attribution of users. Discover the various authentication models employed by extensions and explore how the user's UUID is stored as the tracking 
docTags: WX-732KZOub96_R0NW2HX
createdAt: 2023-01-10T16:21:33.000Z
---

## Overview

Before we get started, it's important to understand what a tracking code(TC) is and why it is used.

When a user installs your extension, we need a way to identify the user to affiliate when they activate cash back through your extension, in order to attribute them properly when the sale completes its lifecycle. This is done at Wildfire by attaching a TC query parameter at the end of your affiliate url. Once the sale completes its lifecycle, you can retrieve the value within the TC parameter. By going in to the admin tool, and posting the data to your callback URL.

Example of a vanity URL with a TC parameter:

```Text
https://wild.link/lovepop/AIuL-AI?tc=ee5f1a61-a2f1-4cde-be78-293fa339e592
```

Example of an offline vanity URL with a TC parameter:

```Text
https://wild.link/e?d=0&c=0&tc=2d4109a6-c5f6-4028-a206-c26b1379ea82&url=https://example.com
```

## Authentication Details

Many extensions use different models, whether it's an OAuth flow, or logging in directly through the extension. They all serve the purpose of having the user identify themselves, and saving that identifier in the extension's storage. For this method we will leverage your existing authentication system. The extension will send the user to the partner's login page with a URI included as a query parameter.

Example of login URL

```Text
https://www.example.com/login?uri=chrome-extension%3A%2F%2Fextensionidhere%2Fauth.html
```

After the user is successfully authenticated the partner will redirect to the provided URI and include the user's UUID as a query parameter.

Example of redirect URL

```none
chrome-extension://extensionidhere/auth.html?uuid=UUIDHERE
```

At this step the extension will store the UUID and include it as the tracking code on all affiliate link activations.

:::hint{type="danger"}
When passing a UUID ensure that each UUID is unique to a single user, does not change, and is a valid UUID. Each individual user should only have one UUID.
:::



::Image[]{src="https://api.archbee.com/api/optimize/wthfaKSfl2GjN63-tET7T/uTsgKaDXEr2XG7LMc_NW2_simple-extension-auth-.png" size="60" width="800" height="474" caption="Sequence Diagram" position="center" darkWidth="800" darkHeight="474" showCaption="true"}

