Track which link a contributor followed to make a contribution

The most straight forward way

The simplest was to know whether people are giving to you based on a email campaign vs a link you sent via a social network versus just stumbling in from a web search is to create separate contribution pages. Then, publicize the different contribution pages via the different mediums and it's all quite easy.

Another way

However, if you are constantly changing how you are promoting your contribution pages and maintaining dozens of different pages seems cumbersome, here's an alternative.

Create a custom contribution field

  1. `Administer -> Customize Data and Screens -> Custom fields
  2. If you already have a set of Custom fields for contributions you can use your existing set (assuming it applies to all contributions). Otherwise, click Add set of custom fields and name it 'UTM Contribution tracking' (UTM stands for Urchin Traffic Monitor - it's a weird name that has become synonymous with tracking where someone came from who visited your site) and specify that it should be Used for Contributions of -Any- type.
  3. Create one field called UTM source and make it an alphanumeric field of the type 'Text`
  4. After you save the field, note the ID that is assigned to this field. This is a bit tricky - after you click "Save" you will be returned to a list of fields - you should see just one, the one you created. If you hover of the Edit link next to it, you will see in the bottom corner of the browser what link it will open. It should end with something like: action=update&reset=1&gid=31&id=118. In this case the "id" is "118".

Add this field to your profle

Next, find the profile that is used on your contribution page. If you lookup your contribution page (Contributions -> Manage Contributions) click Configure -> Include profiles you will get to the page.

Click Edit next to your chosen profile.

Then, on the right side, expand the set of fields where you added the "UTM Source" field.

When you find the field, drag it into your profile.

Then, click the pencil icon next to it so you can edit the settings.

Change the label to say just "Source" - or whatever you want displayed to the donor.

Then, look for the 'view only` setting and change it to Yes.

Ready to test!

Now, open up your contribution page as if you are going to make a contribution.

You should see the Source field and it should be empty.

Now, edit the address in your browser's location bar. It might read something like this:

https://training.ourpowerbase.net/civicrm/contribute/transact?reset=1&id=1

You will want to append a value to it based on the id number of your custom field and the value you want recorded for this contribution. If the custom field was 118 and you were publicizing this campaign via email, you would add '&custom_118=email` - for example:

https://training.ourpowerbase.net/civicrm/contribute/transact?reset=1&id=1&custom_118=email

Now, you can advertise your campaign using the same contribution page, but change the part after the equals sign, and whatever is there will show up in the source field of the contribution, allowing you to search by that field to see where they are coming from.

Category: 
Contributions