Overview
When the Feathr Super Pixel is installed on your site, it will automatically and anonymously track the activity of your online visitors.
This article will describe the three methods made available through the Feathr Super Pixel and demonstrate how to use them. These are the most common reasons you may want to extend your Super Pixel:
- Your organization wants to capture personally identifiable information
- Your website is a single page application and does not reload on navigation
- There is a specific and important action you want to capture in a page
Authentication
Once your unique Super Pixel has been placed in your website's HTML, you have access to the feathr
object.
There are no other authentication steps.
Definitions and Concepts
Feathr Super Pixel
The Feathr Super Pixel is a snippet of code that you can copy from the Community > Super Pixel section of the Feathr app. If you don't have a Feathr login, ask someone at your organization to copy the Super Pixel snippet to a plain text file and send it to you. See this article for more information on installing the Super Pixel on your site.
When this code runs, it initializes tracking for your Feathr account and reports one page view activity that can be seen in the Feathr app. The components of the Super Pixel can be broken down and used individually which will be discussed below.
Person
A Person record is the profile of an online visitor to your website. Feathr keeps track of them via a unique cookie ID that is assigned the first time they encounter a page with the Super Pixel.
Attribute
An Attribute is a property a Person has, such as a name or email. Check out our article on
Breadcrumb
A Breadcrumb record is an action done by a Person. As a Person moves through your website, Feathr captures this as a trail of activity without overwriting past data. Check out our
Flavor
The type of activity recorded is referred to as the Breadcrumb's Flavor. The Flavor can be custom or one of the standard values defined in the
The relationship between Persons, Attributes, and Breadcrumbs
Each individual Person can have multiple Attributes and Breadcrumbs. It is common for one Person to have hundreds of Breadcrumbs. Each individual Attribute and Breadcrumb is for one individual Person.
Implementation
Fly
Fly is used to initialize tracking for your Feathr account. Fly is called within the standard Feathr Super Pixel and does not need to be called again if the Feathr Super Pixel already exists on the page.
feathr("fly",<account_id>);
<account_id>
string
Your unique Feathr account ID
Update
Update is used to update the Attributes of a Person.
Syntax
feathr("update",{
<attribute>: <value>
});
<attribute>
string
The name of the Attribute to update. Check out the
<value>
string, integer, or array
The value to assign the Attribute.
Common Use Cases and Examples
Update is commonly triggered on a form's Submit button. The information a Person enters into a form can be programmatically retrieved, placed into a JavaScript object, and supplied to the Update.
The following example updates the visiting Person's name to LeBron Cranes and email to lebron.cranes@feathr.co.
feathr("update", {
"name": "LeBron Cranes",
"email": "lebron.cranes@feathr.co"
});
The following example updates the visiting Person's membership status to "Golden Eagle". Note: the key is in all caps, in keeping with common practice for custom Attributes.
feathr("update", {
"MEMBERSHIP_STATUS": "Golden Eagle"
});
The following example updates the visiting Person's name to Kanye Nest and booth number to 7.
feathr("update", {
"name": "Kanye Nest",
"EVENT_BOOTH_NUMBER": 7
});
Sprinkle
Sprinkle is used to capture an activity by creating a Breadcrumb. Sprinkle provides you with the ability to overwrite a default field's value, or capture custom data if you have Feathr ID, by passing in an optional JavaScript object.
Syntax
feathr("sprinkle", <flavor> [,{
<key>: <value>
}]);
<flavor>
string
The type of activity. Check out the Flavor definition above to learn more.
<key>
string
The name of the activity field.
<value>
string, integer, or array
The value of the activity field.
Common Use Cases and Examples
The following example captures an activity with the Flavor "page view", with no additional custom data.
feathr("sprinkle", "page_view");
The following example captures a registration confirmation activity with the Flavor "form submission" for an event named FeathrCon 2021.
feathr("sprinkle", "form_submission", {
"REG_CONFIRM": "FeathrCon 2021"
The following example exhibits how to capture multiple custom fields in a single sprinkle. To create a goal Group using multiple custom fields, both custom fields must be captured in the same sprinkle. For example, to create a goal Group where REG_CONFIRM
and TICKET_TYPE
are both predicates, the sprinkle must look like:
feathr("sprinkle", form_submission, {
"REG_CONFIRM": "FeathrCon 2021",
"TICKET_TYPE": "All Access"
}
The object you pass in can have any number of key-value pairs.
Seeing your changes in the app
After an Update or Sprinkle is executed, you can see the change in a few different parts of the app.
The People section of the Community tab
Check out our article on
The Custom Fields section of the Community tab
This section shows all custom Attributes and Activities.
Person detail page