Global Page View Pixel
To get started, follow the steps given below:
- Copy and paste the Global Page View Tracking Snippet & install on all of your pages
- Map the global variables in the tracking snippet.
<script type="text/javascript">
var br_data = br_data || {};
br_data.acct_id = "<Bloomreach Provided Account ID>";
br_data.ptype = "<Bloomreach Page Type>";
br_data.title = "<title of current page>";
br_data.domain_key = "<Bloomreach Domain Key>";
br_data.view_id = "<Bloomreach View ID>";
br_data.user_id = "<Bloomreach User ID>";
br_data.tms = "<Tag Management system to exclude during transition>";
(function() {
var brtrk = document.createElement('script');
brtrk.type = 'text/javascript';
brtrk.async = true;
brtrk.src = "//cdn.brcdn.com/v1/br-trk-{{BloomReach Account ID}}.js";
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(brtrk, s);
})();
</script>
Global Page View Tracking Variables
Map these data variables in your Global Page View Code Snippet:
Variable | Value type, example | Description |
---|---|---|
br_data.acct_id | string, "1235" | The Bloomreach-provided Account identifier. Value must be consistent with the account_id value passed in API call. |
br_data.ptype | string, "homepage" | Maps your site's page type classifications to the values Bloomreach expects for our page type classifications. Required on all page views, including desktop, mobile, and tablet versions. Bloomreach has 7 page type classifications. See classification examples below. |
br_data.title | string, "Blue Lace Dress" | The title of the current page. Bloomreach uses titles when listing pages in analytics reports for Insights. If you do not have <title> tags set in your HTML, you must add this variable to your pixel. Every page on your site should have a different title. |
br_data.domain_key | string (case-sensitive), "bloomreach_fr" | The Bloomreach-provided ID of the domain receiving the request. This parameter identifies the specific site language version when one account ID hosts multiple site versions with different languages. Bloomreach uses this value to ensure that only query and analytics data that pertain to that language are used for respective features. This parameter is only required if you integrate on a site with multiple language versions. Otherwise, domain_key should not be declared in the pixel as this will cause issues with analytics. The Bloomreach integrations team will inform you whether domain_key will be required for your pixel integration during the technical kickoff call. Value must be consistent with the domain_key value passed in API call. |
br_data.view_id | string (case-sensitive), "10200" | Identifies the specific site catalog view to show when one Bloomreach account ID hosts multiple site versions with unique product catalog characteristics, such as product price, availability, or title. Bloomreach uses View ID value to display the right product information for a user based on their site view. This parameter is only required if you integrate on a site with multiple site versions with unique product catalog characteristics. Otherwise, view_id should not be declared in the pixel as this will cause issues with analytics. The Bloomreach integrations team will inform you whether view_id will be required for your pixel integration during the technical kickoff call. Value must be consistent with the view_id value passed in feed and API call. |
br_data.user_id | string, "947345478564" | If you track users via a universal customer ID, populate this parameter with that ID. This should be an anonymized string and should not contain the user's email or other personally identifiable information. This parameter is only required if you track users via a universal customer ID. This will allow Bloomreach to recognize users in a way that is aligned with your system for various personalization features. If you do not track users this way, leave this blank. Read more on the recommended implementation. |
br_data.tms | string, "tlm" | The name of the Tag Management system, that should be filtered out. In case of migration from one tag management system to another, there may be a transition time frame, when the pixel is fired by two systems simultaneously. Setting the tms param will allow Bloomreach analytics system to filter out duplicate pixels. Use tms="tlm" for Tealium. This parameter is optional and only required during the transition time from one tag management system to another. Leave this field empty, if this scenario does not apply. |
br_data.test_data | bool, "true" | When set to true, this flags pixel data to be ignored during analytics processing. This ensures that you can fire the pixel in a test environment, allowing you to perform pixel validation without affecting your analytics data. Do not declare test_data in the pixel for your live site. |
br_data.currency | string, "GBP" | Optional parameter that designates the currency code for the transaction. We configure the currency value according to your needs. You can choose from EUR, GBP, USD, or any other supported currency mentioned below. Supported currencies: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTC, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNH, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, ISK, JEP, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL |
Page type (ptype) classifications
These are the page type classifications used for the br_data.ptype variable:
Classification | Use case |
---|---|
Home Page Classification | Any home page or landing page that is considered a home page needs to be classified as br_data.ptype = "homepage" |
Product Page Classification | Any product, product bundle, product collection or sku set pages need to be classified as br_data.ptype = "product" |
Category Page Classification | Any category listing pages, category product listing pages or pages that you consider a category page need to be classified as br_data.ptype = "category" |
Search Result Page Classification | Any search listing or search results pages need to be classified as br_data.ptype = "search" |
Content Page Classification | Any content pages need to be classified as br_data.ptype = "content" |
Thematic Page Classification | Bloomreach Thematic pages need to be classified as br_data.ptype = "thematic" |
Other Page Classification | Any Conversion/ Thank You pages as well as any page types that are not one of the above need to be classified as br_data.ptype = "other" |
Native App Implementation
Discovery SDKs
For details on using the Discovery Android and iOS SDKs for specific Native App Implementation, refer to their respective linked guides.
To implement the Global View Pixels in the native app, you must include the following variables. Some variables have the same values and requirements as described in the Tracking Variables table above, but otherwise refer to the table below.
Variables
- acct_id (see Tracking Variables table above)
- ptype (see Tracking Variables table above)
- domain_key (if needed, see Tracking Variables table above)
- view_id (if needed, see Tracking Variables table above)
- user_id (if needed, see Tracking Variables table above)
- test_data (if needed, see Tracking Variables table above)
- cookie2
- rand
- title
- url
- ref
- type
Variable | Value type, example | Description |
---|---|---|
cookie2 | string,
| Anonymous identifier for a particular device instance using a unique user ID (UUID). Format is:uid = {{UUID}}:v=app:ts=0:hc={{hitcount}} The hitcount value should be 1 for a new visitor, or 2 for returning visitors. For the UUID value, we suggest the following: UUID = Math.round(Math.random() * 10E12); Tie the UUID to the device's advertising identifier, so that when a device has its advertising ID reset, the UUID value used in the Bloomreach pixel is also updated. - iOS devices - use the IDFA - Android devices - use the Android Advertising ID - Other devices - use the closest equivalent |
rand | int, "79069731271669680" | A random number that acts as a cache buster to make sure browsers and proxies don't cache requests. |
title | string, "Blue%20Lace%20Dress" | Screen name of the app view. |
url | string, "http%3A%2F%2Fmerchantname .app%2Fproduct%2Fblue%2520 lace%2520dress" | Synthetic unique URL composed of a static base URL and a screen app screen name. Base URL: http://merchantname.app/ To help maintain uniqueness, prefix the screen name with the page type classification. http://merchantname.app/ptype/title ptype and title values here should match the values in their respective variables. |
ref | string, "http%3A%2F%2Fmerchantname .app%2Fcategory%2Fdresses" | Synthetic URL from referrer screen. Follows same format as url param above. |
type | string, "pageview" | The type of tracking fire. For page view pixels, type=pageview. |
Example Native App Global Page View pixel
https://p.brsrvr.com/pix.gif?
acct_id=6702
&cookie2=uid%3D1e7724c751a3f6e6241018d150144832e7528383%3Av%3Dapp%3Ats%3D0%3Ahc%3D1
&rand=79069731271669680
&type=pageview
&title=Blue%20Lace%20Dress
&url=http%3A%2F%2Fmerchantname.app%2Fproduct%2Fblue%2520lace%2520dress
&ref=http%3A%2F%2Fmerchantname.app%2Fcategory%2Fdresses
&ptype=product
Updated about 1 month ago