Why BAM Tracks

BAM captures key user behavior on your site including what products are being viewed, added-to-cart, and ultimately purchased. All of the data is used to make more informed programmatic auction decisions to target your future customers. For example, there may be price points that drive higher email signups while others end up being associated with consistently high bounce rates. Both trends would cause BAM’s algorithm to adjust your bidding strategy to optimize performance.

 

Our Evolving Technology

We are constantly improving our technology and are currently working on evolving our tag to a more comprehensive SDK solution. The BAM SDK will allow merchants to create and push event data to our API. This will help facilitate faster integration, align events to relevant data parameters, and automate future tag updates.

 

V1.0 Data Layer Basics

Our tag’s data layer is an object (BAMX_EVENT_DATA) that contains all of the fields used by the BAM bidding algorithm. The object contains key:value pairs which the JS tag references with every page load and sends to our servers.


All of the information relevant to the data layer is available on your site. JavaScript code needs to be written to push values from your page to their corresponding data layer fields.

 

Integration Steps

Step 1
Copy the JS tag provided below and replace the “clientid” text with the client ID referenced in your email. Please note that the ID is case sensitive so please make sure all text is in lowercase as provided. Now you can add the pixel code to your website.

 

Step 2
Paste the BAM JS tag code into every page of your site. Place the code immediately before the closing </head> tag in your HTML. If you’re using a global include file (e.g., header.php), the code should be inserted there.

 

Step 3
Read through the definitions for each of the fields in the data layer. On each page, determine which of your data is most appropriate. Replace 'null' with the relevant data for your page.


If a specific field is not relevant to the page type, you can leave those fields ‘null’ without any negative effect.  For example, if an individual has not yet reached the checkout confirmation page, there is no need to fill in the order ID or order value.

 

Step 4
Please provide us with credentials to access your staging site for us to test. To QA the checkout page we will also need a test account or test credit card number to run against.

 

Default JS TAG

<!-- begin BAM-X jstag -->
<script type="text/javascript">
    window.BAMX_EVENT_DATA = {
        event: null,
        page_type: null,
        site_type: null,
        ip: null,
        user_email: null,
        user_id: null,
        product_id: null,
        product_name: null,
        product_brand: null,
        product_price: null,
        product_size: null,
        product_quantity: null,
        products_in_cart: null,
        products_purchased: null,
        subscription_email: null,
        name: null,
        billing_city: null,
        billing_state: null,
        billing_zip_code: null,
        billing_country: null,
        order_id: null,
        order_value: null,
        currency: null,
        last_four: null,
        is_new_customer: null
    };
 
    (function (account) {
        try {
            var b = document.createElement("script");
            b.type = "text/javascript";
            b.src = "//static.bam-x.com/tags/" + account + ".js";
            b.async = true;
            var a = document.getElementsByTagName("script")[0];
            a.parentNode.insertBefore(b, a);
        } catch (e) {}
    }("SLUG"));
</script>
<!-- end BAM-X jstag -->
 

Field Definitions

Text

 

Summary Block
This is example content. Double-click here and select a page to feature its content. Learn more.

Complete Data Layer - Examples

The following are examples of how you would populate the fields in the data layer across different page types. 

 

FAQs

What if we are using a single page site?
BAM’s tag does not monitor for changes on the page if it does not reload. This means that single application sites need to set up new data layer and reload the BAM JS tag so that we can receive checkout information.

 

How do I set up the JS tag in Shopify?
Shopify has some robust documentation on how to add conversion tracking to your site. If your site does not use an order confirmation page, use this documentation to fire the tracking tag only on first visit to the order status page.

 

How do I test that I setup the tag correctly in my local environment?
We have configured the JS tag to point to our internal server when tested locally. The code does not currently check for any other environment or IP flag other than "local". For local testing of the pixel, please change the default IP from "localhost" to "0.0.0.0"

 

Contact BAM

If you have any questions or need additional support, please reach out to Josh@bam-x.com