You can use Outseta's registration defaults to capture the referring domain at sign-up for accurate marketing attribution.

The following custom code snippet adds the referring domain as hidden fields in your registration form.

It implements first-touch attribution, which ensures proper credit is given to the original marketing source even if users return later through different channels.

👉 You might also be interested in Attribute sign-ups with UTM values

Prerequisite

  • You need the following account custom property:
    • Label: "Referring Domain", System name: ReferringDomain, Control type: Text

Custom Snippet

Paste the following custom snippet ABOVE the Outseta Options and Script already in the head of your site:

<!--- ✨ Start: Custom Referring Domain Snippet  ---->
<script>
var ReferringDomain = localStorage.getItem("o-snippet.referring-domain");
if (!ReferringDomain && document.referrer) {
const ReferrerURL = new URL(document.referrer);
// Sets first touch Referrer value if one is present
ReferringDomain = ReferrerURL.hostname;
localStorage.setItem("o-snippet.referring-domain", ReferringDomain);
}
</script>
<!--- Custom Referring Domain Snippet: End ✨ ---->

Then update your existing Outseta Options with the auth options seen below:

<!-- Outseta Options -->
<script>
var o_options = {
domain: "snippets.outseta.com",
auth: {
registrationDefaults: {
Account: {
ReferringDomain,
}

},
}
};
</script>

<!-- Outseta External Script -->
<script src="https://cdn.outseta.com/outseta.min.js" data-options="o_options"></script>

💡 Remember to add a comma to the end of the last line in your current options if there is none. Otherwise, you'll see a popup stating "[domain] is a required option to initialize the Outseta script."

⚠️ If you are using the referring domain in combination with UTM attribution, update your options to this instead:

<!-- Outseta Options -->
<script>
var o_options = {
domain: "snippets.outseta.com",
auth: {
registrationDefaults: {
Account: {
...UtmValues,
ReferringDomain,
}

},
}
};
</script>

<!-- Outseta External Script -->
<script src="https://cdn.outseta.com/outseta.min.js" data-options="o_options"></script>