Sources¶
In ActionKit a source is saved for each action a user takes. The source reflects where the action came from -- often a link in a mailing or on a website. Each user is also assigned a source.
Action and user source data can be used to analyze the efficacy of a specific tactic or to evaluate user performance over time. Source data can be helpful for answer questions like:
- which tactic generated the most donations for a specific campaign?
- where do our most active members come from?
- where do most of our members come from?
- are the new members who came from a paid ad donating enough to cover the acquisition costs?
Action Sources¶
When a user takes action on any page in ActionKit, a record of that action is saved in the core_action table. The record includes a field for the source of the action. If the page does not allow multiple responses (i.e. a user's action overwrites the previous actions on the page), and a user submits more than once on a page, the latest entry will overwrite the previous one.
Note that the user source will always reflect the original source of the first action taken by a user.
Most actions are the result of a user submitting on a page. ActionKit looks at the link the user followed to see if it includes the source. That information is automatically added to links generated by ActionKit through the mailer or tell-a-friend widget.
If source information isn't included in the link, the source defaults to website. You can tell ActionKit to instead assign a source you include in your own links that you want to track (e.g. on your homepage or Facebook or Twitter). For more information, see Setting the action source.
Actions that are imported through the uploader or created through the API will have a source of import and api respectively, unless you assign one when you create the action.
ActionKit's built in sources are:
- api - actions you add through the API have this source unless you specify another source in your code.
- conf - actions by users who followed a link in an after-action (confirmation) email.
- import - actions created by importing users from the users tab; only used if you do not assign your own source to the import. See Importing users.
- mailing - actions by users who followed a link in an email sent through ActionKit. You can find out which email by looking in the
mailing_id
column - taf - actions by users who followed a link in a tell-a-friend email; this source indicates this user's email was entered in the taf box
- mailto - users who followed a link in a tell-a-friend email; this source indicates that the original action taker clicked to mail friends through their own email program
- share - users who shared using facebook, twitter, or other types of sharing, such as user-copied share links; details can be found in the share tables
- website - all other users; these users could have come to this page from your home page or an email from a friend (not through our taf system) or from a social networking site, etc.
For "taf" and "mailto", ActionKit records the referring_user_id
and the referring_mailing_id
in the corresponding fields whenever possible.
User Source¶
Each user has one source in the core_user table. User source can be changed using the API or the uploader. It cannot be changed in the admin.
The source of the user's first action is always the user source, unless the user was created during your initial import from another system. In that case, we'll use whatever field you designate from the source data as the user source.
You can update a user's original source in core_user via the API, or by using an upload file.
Setting The Action Source¶
As stated above in Action sources, the source is usually recorded in the link that brings a user to your action page. If you have created a link to an action page and you want to track the actions coming from it, you may want to add an action source to your link.
For example, the URL of an ActionKit page might look like:
http://actionkit.example.com/go/example/?source=banner_ads&akid=.81724.FaFsEb
The source=
argument is what you add to links to let you track which users came from which source - for example, you might use source=banner_ads
in an advertising campaign and source=homepage
on the homepage. The akid=
argument is a user ID and cryptographic hash used to personalize each user's link.
The source argument in the link is used by some Javascript to add a hidden element in the form.
The URL http://roboticdogs.me/?source=awoogah results in the hidden element:
<input type="hidden" name="source" value="awoogah">
The form processing looks for an input named source, so you can just set a hidden element source to the form with whatever value you want if you'd like to set a source for a particular page (for example, if you're embedding a page and want to tell who came from the embedded version of the page).
Note
When someone comes to a page with a source appended to the URL, ActionKit also uses that source for the redirect page. We check for a hardcoded source in the redirect first so we won't overwrite a source you add manually.