Skip to content

Help Center

Capturing Custom Parameters

When a visitor arrives on your site, Attributer captures the standard UTM parameters (utm_medium, utm_source, utm_campaign, utm_term & utm_content) and stores them in a cookie in the visitor’s browser. Then when the visitor submits a form, it writes those into the Channel & Channel Drilldown fields.

Occasionally though, you may want to capture more parameters than just the standard UTM parameters. Some common additional parameters people want to capture include ‘creative’ or ‘device’ or ‘brand’.

With a little tweaking, Attributer can capture these custom URL parameters, store them in a cookie, and pass them into hidden fields on your form.

In this article, we’ll show you how to set this up.

Step 1: Copy and edit the below code

The code below is a little bit of ‘modifier code’ that tells Attributer to capture the additional URL parameters you define.

<script>
    window.attributersettings = {
        customFields: ["brand", "affiliate"]
      }
</script>

Copy the above code and replace the words “brand’ or “affiliate” with whatever URL parameters you wanted to capture.

So for instance, if I wanted to capture the “device” or “creative” URL parameters then my code would look like this:

<script>
    window.attributersettings = {
        customFields: ["device", "creative"]
      }
</script>

Step 2: Paste the code above the Attributer code on your website

Now that you have modified the code to include the customer URL parameters you want to include, you need to paste it ABOVE the Attributer code.

So it needs to look a bit like this:

Step 3: Add hidden fields to your form where Attributer can write the custom parameters

Now that you have added the code modifier, it’s time to add some hidden fields to your lead capture forms so that Attributer has a place to write whatever information it has captured from your custom URL parameters.

To do so, simply open your chosen form builder and add some new hidden fields to your form. You’ll need to add a hidden field for each custom URL parameter you wish to capture.

Depending on what form builder you are using, you’ll need to give each field a custom default value or name.

Default Value

If you are using a form builder like Gravity Forms or WPForms and you previously added default values to the Channel & Channel Drilldown fields, then you’ll need to add default values to these new fields as well.

The default value to use is [custom-yourcustomparameter].

So for instance, if you wanted to capture the ‘brand’ URL parameter then the custom value would be [custom-brand].

Note: This needs to match what you entered into the modifier code in Step 1

Field Name

If you are using a form builder like Pardot Forms, Zoho Forms, etc and you previously added specific field names to the Channel & Channel Drilldown fields, then you’ll need to add specific fields to these new fields as well.

The field name to use is ‘attributer-custom-yourcustomparameter

So for instance, if you wanted to capture the ‘brand’ URL parameter then the field name would be ‘attributer-custom-brand’

Note: This needs to match what you entered into the modifier code in Step 1

Step 3: Publish the changes to your form and test

Now that you have added the hidden fields, make sure you publish the changes to your form so that these additional hidden fields appear on the form embedded on your website.

Finally, you can test this by opening a new incognito window, navigating to your website with the custom URL parameters in the URL, completing the form, and confirming that Attributer is correctly storing and passing through the values from your custom URL parameters.


If for any reason it isn’t working or you need help setting this up, feel free to use this link to book a time to jump on a call with a member of our team, or send us an email here.

Can't find the answer you need? Contact us!

Our team are available to answer any questions you have

Support Images