Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Big Bear Scripts Documentation

Click script documentation


The click script needs to be implemented on All pages of the site. For this script to work, the
following settings need to happen:

Allow the addition of a new cookie on the https://demax.ro/ domain, named _twoAttr

In case you’re doing any automatic redirects anytime on the site, after the user’s first contact,
also copy the Big Bear URL suffixes on redirect and add them to the redirected page.

Big Bear click script:


Big Bear click script for https://demax.ro/

<script defer src='https://attr-2p.com/d6315a1b4/clc/1.js'></script>

General user flow:


An internet user clicks on a marketer link from 2Performant
The user is taken to http://event.2performant.com, which checks the data in the link and
adds the Big Bear URL suffixes to the URL
The user is taken to any page from https://demax.ro/, which executes the script above and
validates that the traffic comes from a 2Performant marketer and adds a cookie on the
https://demax.ro/ domain.

The information in the cookie is:


A unique marketer identifier
The time until which that marketer sent the user
A click identifier
Integration data (name, version, mode)

IMPORTANT NOTE: Set up so as to not let search crawlers index pages with Big Bear URL
suffixes. The Suffixes are: 2pau, 2ptt, 2ptu, 2prp, 2pdlst

As specific recommendations, we would invite you to:

1. Add the following disallow rules to robots.txt:


Disallow: /*2pau

Disallow: /*2ptt

Disallow: /*2ptu

Disallow: /*2prp

Disallow: /*2pdlst

2. Add a noindex tag in pages containing one of the following redirect parameters: 2pau, 2ptt,
2ptu, 2prp, 2pdlst:

<meta name="robots" content="noindex">

3. If you run Dynamic Search Ads (DSA) or Performance Max campaigns on Google Ads, add
exclusion rules for URL links with the following redirect parameters: 2pau, 2ptt, 2ptu, 2prp,
2pdlst.

For DSA: Create exclusions for Dynamic Search Ads - Google Ads Help

For Performance Max: About automatically created assets in Performance Max campaigns -
Google Ads Help

Sales attribution scripts - variable percentage commission


There are 2 sales attribution scripts that need to be added in order for a correct sales attribution:

tpOrder script
sls js script

The sales attribution scripts have to be implemented:

on all thank you pages of the site


for all payment methods

Usually, there is only one thank you page and multiple payment methods (bank transfer, cash
on delivery, online payment, etc.).

Because this is the script for variable percentage commissioning, there has to be a
commissioning strategy previously established and implemented.
tpOrder script
In order for the scripts to be integrated properly, you need to allow a javascript variable to be
added to demax.ro domain command confirmation pages named tpOrder.

After that, you need to install the following script:

<script>
var tpOrder = {
id: 'ORDER_ID',
placed_at: TIMESTAMP,
currency_code: 'CURRENCY_CODE',
items: [{
quantity: PRODUCT_1_QUANTITY,
product_id: 'PRODUCT_1_ID',
value: PRODUCT_1_VALUE,
name: 'PRODUCT_1_NAME',
category: ['PRODUCT_1_CATEGORY', 'PRODUCT_1_SUBCATEGORY',
'PRODUCT_1_SUBCATEGORY_SUBCATEGORY'],
brand: 'PRODUCT_1_BRAND',
commission_percent: PRODUCT_1_COM_PERCENT,
},
{
quantity: PRODUCT_2_QUANTITY,
product_id: 'PRODUCT_2_ID',
value: PRODUCT_2_VALUE,
name: 'PRODUCT_2_NAME',
category: ['PRODUCT_2_CATEGORY', 'PRODUCT_2_SUBCATEGORY',
'PRODUCT_2_SUBCATEGORY_SUBCATEGORY'],
brand: 'PRODUCT_2_BRAND',
commission_percent: PRODUCT_2_COM_PERCENT,
}]
} </script>
field What should it contain Requirements Type
id The unique identifier of the sale in the Mandatory String
ecommerce system of demax.ro Also called
the Transaction ID. It needs to be the same
on both Big Bear and iframe codes. In the
iframe code it's: transaction_id=
placed_at UNIX timestamp of the time the order was Optional - if you're Integer
placed, in seconds Javascript: Math. not imputing the
floor(new Date().getTime() / 1000) If this field timestamp, don't add
doesn't appear, we'll add it when we receive this field at all
the call.
currency_code The currency in which the products are Optional - if you're String
expressed on demax.ro, as set in Settings - not imputing the
Currency. Must be equal to the currency currency_code, don't
configured in 2Performant. Format: ISO 4217 add this field at all
code (3 letters) Must be one of the accepted
currencies: https://api.2performant.com/
public/currencies.json If this field doesn't
appear, we'll add it based on info from
Settings - Currency.
items Array of objects necessary to identify the Mandatory Array of Objects
contents of the transaction and the value of array[object]
the transaction. Elements in array: quantity,
product_id, value, name,
commission_percent, category, brand.
quantity How many pieces of this product are present Mandatory Integer>0
in the order.
product_id The unique identifier of a product on demax. Mandatory String
ro
name Product name as identified on demax.ro Mandatory String > 0, < 255
bytes
value Unit price of the product without VAT (if the Mandatory Float > 0 2
company operating the site pays VAT). decimals the
decimal separator
is . (point) it
should not contain
either commas nor
currency
category Category breadcrumbs for the product. Mandatory Array of string
array[string] Size
array max. 10 Size
string max. 100
bytes
brand Brand of the product. Mandatory String > 0, <= 255
bytes
commission_percent Commission percentage needs to have the Mandatory Float > 0 2
value of percentage that the marketer will decimals the
receive for said product. If for Product 1 he decimal separator
gest 4% commisssion, then in is . (point) it
commission_percent you'll need to send 4. should not contain
either commas nor
percent

sls js script
After the tpOrder script, you’ll have to add the sls js script in order for the data collected by
tpOrder to be sent to 2Performant.

Big Bear sls script for demax.ro:

<script defer src='https://attr-2p.com/d6315a1b4/sls/1.js'> </script>

You might also like