# Custom Attribution

### Custom Source Attribution

Sources are a great way to measure your marketing efforts. ReferralHero **tracks the traffic source of each subscriber automatically** if you are using a ReferralHero widget or our Javascript API. By default, ReferralHero will attribute a source to each subscriber based on the previous referring site e.g. Facebook, Twitter, Facebook Messenger, Email, Whatsapp, Telegram, Linkedin, etc.

If you want to get more granular and track your own referring channel (e.g. Facebook ads or your newsletter), simply add the [UTM parameter](https://blog.hubspot.com/customers/understanding-basics-utm-parameters) utm\_source to the URL. ReferralHero will capture the custom utm\_source if one is defined and attribute the traffic source accordingly.

For example, let's say you send out a newsletter and want to track signups. You can create a link like: `http://mylandingpage.com?utm_source=newsletter` to use in your newsletter. ReferralHero will capture the custom utm\_source and set it as the source for the traffic coming from that link.&#x20;

Here is an example of the ReferralHero Analytics page capturing multiple sources:<br>

<figure><img src="/files/tVMs05Y5mIiPOw92vA5G" alt=""><figcaption></figcaption></figure>

### **Other UTM Tracking Parameters**

In addition to tracking sources, you can also set up other static UTM parameters across your whole referral campaign. This would be useful if you wanted to see in google analytics how much traffic was being sent to your website as a result of your referral program.&#x20;

To send a campaign parameter to Google Analytics, and apply it across all unique referral links, add the UTM parameter utm\_campaign to your default referral URL. ReferralHero will automatically add the subscriber’s unique tracking variable to the end.&#x20;

To edit your default referral link go to *Edit Campagin > Options > Default Referral Link*

\ <mark style="background-color:blue;"><http://mylandingpage.com?utm\\_campaign=referralprogram></mark><mark style="background-color:orange;">\&mwr=1a34fe4</mark>

<mark style="background-color:blue;">Set as default referral URL</mark>

<mark style="background-color:orange;">The unique tracking variable will be automatically added for each subscriber</mark>

{% hint style="info" %}
**NOTE:** If you're looking to track goals or send conversion events to Google Analytics when a ReferralHero widget is submitted, [see here](/common-questions.md#how-can-i-track-sign-ups-in-google-analytics).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.referralhero.com/campaign-builder/misc/custom-source-attribution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
