Set member attributes

In this help doc, learn how to set member attributes like UTM parameters and custom parameters. Additionally, discover where Memberful collects these parameters in our platform. Collecting these attributes allows you to trace where members signed up from and the success of your campaigns.

In this help doc:

Set up UTM parameters

UTM parameters ( utm_source, utm_medium, utm_campaign, utm_content, utm_term) are tags that you can add to a URL to track where your members came from. You can generate these URLs with Google’s URL builder.

You can add the UTM parameters to a URL pointing to your site or a specific plan purchase link. For example, this link would tell you which members visited your site from a specific Twitter campaign:

https://YOURSITE.com?utm_campaign=springpromo&utm_medium=social&utm_source=twitter

Set up tracking parameters

There are three ways to track custom parameters (such as number of viewed pages).

A) Via Javascript

Insert a JavaScript function called memberfulTrackingData() into the page that contains the plan purchase link.

<script>
function memberfulTrackingData(parameters) {
  parameters.SomeTrackingParameter = "Some value";
  return parameters;
}
</script>

Replace SomeTrackingParameter with the name of the tracking parameter you want to track, and Some value with the data you want to assign for this member's parameter.

You can insert that snippet directly into the HTML of your page.

B) Via query strings on a plan purchase link

Add tracking parameters directly to a plan purchase link via query strings.

Start with a regular plan purchase link.

https://ACCOUNT-URL.memberful.com/checkout?plan=12345

Add an ampersand (&) symbol, and for each parameter you'd like to track, add mt_ followed by the name of the parameter, and then an equal sign (=) followed by the value you'd like to assign to that parameter. You can replace spaces with plus signs (+). The final result should look like this:

https://ACCOUNT-URL.memberful.com/checkout?plan=12345&mt_SomeTrackingParameter=Some+value

Repeat this process for each parameter you'd like to track.

C) Through a hidden parameter in a form

To use tracking parameters with a form like the Choose What You Pay form we show in our docs, add a hidden input with a name that starts with mt_ followed by the name of the parameter.

<input type="hidden" name="mt_SomeTrackingParameter" value="Some value" />

For this to work, the "action" attribute of the form should lead to the plan purchase URL.

For tracking parameters to work, you must have integrated Memberful with your website by following the instructions at Website → Settings.

Where does Memberful collect these parameters?

When a customer clicks a link with a UTM parameter or a custom parameter, Memberful collects these parameters during checkout and displays them as Attributes in the member's profile.

Member attributes

This information (with the exception of custom parameters) is also captured in the Members CSV export, which you can generate from the Members tab. Additionally, if you've configured the Google Analytics integration, any custom parameters will be passed through to Google Analytics.

The first time a potential member visits your site (with the Memberful plugin running) their "referrer" value is set. So, even if they sign up later after coming in from a different link, as long as they're using the same browser, they'll get the original referrer value.

An exception occurs if the member switches their browser or device or deletes local data in the browser before signing up. In such cases, the referrer can be set again. It's important to note that the value is stored in browser local storage (not a cookie), and various browsers have their own policies regarding how long this data persists per site. Typically, it will remain indefinitely unless a user manually clears it.

Related help docs:

Can't find what you're looking for? We'd love to help! 💪

Send us a message through the orange chat bubble in the lower right corner of the page. You'll hear back within a few hours Monday - Friday. 😀