Last Updated 10/8/18.

There are some cases where you may want to add multiple instances of the Super Pixel to a page that run in parallel. For instance, you might have two different pixels, one representing a parent organization gathering general data from several child organization's pages, while that child organization has more detailed tracking on their site. The Super Pixel supports this use case by way of a couple of simple modifications to the Super Pixel snippet.

<script>
!function(f,e,a,t,h,r){if(!f[h]){r=f[h]=function(){r.invoke?
r.invoke.apply(r,arguments):r.queue.push(arguments)},
r.queue=[],r.loaded=1*new Date,r.version="1.0.0",
f.FeathrBoomerang=r;var g=e.createElement(a),
h=e.getElementsByTagName("head")[0]||e.getElementsByTagName("script")[0].parentNode;
g.async=!0,g.src=t,h.appendChild(g)}
}(window,document,"script","https://cdn.feathr.co/js/boomerang.min.js", "feathr")


feathr('fly', '<FEATHR ACCOUNT ID 1>');
feathr('sprinkle', 'page_view');

!function(f,e,a,t,h,r){if(!f[h]){r=f[h]=function(){r.invoke?
r.invoke.apply(r,arguments):r.queue.push(arguments)},
r.queue=[],r.loaded=1*new Date,r.version="1.0.0",
f.FeathrBoomerang=r;var g=e.createElement(a),
h=e.getElementsByTagName("head")[0]||e.getElementsByTagName("script")[0].parentNode;
g.async=!0,g.src=t,h.appendChild(g)}
}(window,document,"script","https://cdn.feathr.co/js/boomerang.min.js", "feathr2")


feathr2('fly', '<FEATHR ACCOUNT ID 2>');
feathr2('sprinkle', 'page_view');

</script>

Above is an example of a correct implementation of two pixels on a single page. The basic idea is that you copy and paste the Super Pixel script from the Super Pixel page in the app for each account for which you want to track activity on the page, one after the other. However, on the second tag expression (the second part that starts with "!function(f,e,a,t,h,r)" and ends with "feathr") we change that last "feathr" to "feathr2". In addition, in the two following function invocations (the lines that start with "feathr("), we change the "feathr" to "feathr2" to match. Finally, we of course make sure that the second "feathr('fly', ...);" function invocation uses the account id for our second account for which we are tracking activity on this page.
Before (1st Super Pixel Instance)

After (2nd Super Pixel Instance)

Changing the word at the end of the tag expression (from "feathr" to "feathr2") creates a new, independent super pixel object on the page with a new name. The name can be anything you want as long as it starts with "feathr". You can add as many pixels to a page as you as long as you name them distinctly and control them in the function invocations (the "feathr(...);" lines) with that distinct name.

Related Articles

How to Add the Super Pixel to Your Site
When to Use Update vs. Sprinkle Functions
Common Sprinkle Use-Cases

Did this answer your question?