Skip to main content

Global Code Setup Overview

The DATA Reshape tracking script enables server-side tracking across all pages by collecting event data, managing user sessions, and streaming information to your analytics and marketing platforms.

What is the Global Code?

The global tracking code is a lightweight JavaScript script that:

  • Collects Event Data - Captures user interactions and behaviors
  • Manages User Sessions - Tracks visitors across multiple events
  • Forwards Data - Sends information to your analytics and marketing platforms
  • Ensures Privacy - Operates under your domain for first-party data collection
  • Bypasses Limitations - Avoids ad blockers and browser restrictions

Prerequisites

Required Before Implementation

Only implement after receiving confirmation that your custom domain and SSL certificate are active.

Required Information:

  • Custom tracking subdomain (e.g., dre2.yourdomain.com)
  • Script ID provided by DATA Reshape team
  • Website access to modify HTML/code

Quick Implementation

The basic implementation involves adding this code to your website's <head> section:

<script>
(function(R,e,s,h,a,p,E){
var b=R.Reshape=R.Reshape||{};
b.setCookie=function(n,v,t,d){try{e.cookie=n+'='+v+';max-age='+t+';domain='+d+';path=/;SameSite=None;Secure';}catch(e){}};
b.id=a;b.cdn=h;
E=e.getElementsByTagName(s)[0];p=e.createElement(s);p.async=true;p.src="https://"+h+"/main.js?id="+a;E.parentNode.insertBefore(p,E);
})(window,document,"script","YOUR_SUBDOMAIN","YOUR_SCRIPT_ID");
</script>
Important Replacements

Replace YOUR_SUBDOMAIN with your actual subdomain and YOUR_SCRIPT_ID with the ID provided by DATA Reshape team.

Platform-Specific Implementation

Choose the implementation guide that matches your platform:

General Websites

For custom websites, HTML sites, or any platform not listed below.

→ General Implementation Guide

WordPress

Complete WordPress implementation with multiple methods and WooCommerce support.

→ WordPress Implementation Guide

Shopify

Full Shopify integration using Theme, Customer Events and Custom Pixels.

→ Shopify Implementation Guide

What Happens After Implementation?

Once the global code is successfully implemented:

Immediate Benefits

  • Page View Tracking - Automatic visitor and session tracking
  • User Identification - Unique visitor identification across sessions
  • Basic Analytics - Foundation for all other tracking events

Next Steps

  1. Verify Implementation - Confirm script loads without errors
  2. Add Event Tracking - Implement business-specific events
  3. Include Customer Data - Add user identification and properties
  4. Configure Destinations - Connect to your analytics platforms

Event Implementation Paths

Choose your next step based on your business type:

E-commerce Tracking

For online stores and product-based businesses:

  • Product view events
  • Shopping cart tracking
  • Purchase completion
  • Revenue attribution
→ E-commerce Event Implementation

Lead Generation Tracking

For service businesses and B2B companies:

  • Form submission tracking
  • Lead qualification events
  • Contact information capture
  • Conversion funnel analysis
→ Lead Generation Event Implementation

Custom Event Tracking

For unique business requirements:

  • Custom event definitions
  • Advanced user properties
  • Business-specific metrics
  • Technical implementation

→ Custom Event Implementation

Technical Support

  • Implementation Questions - Contact DATA Reshape team for setup assistance
  • Event Planning - Get guidance on which events to implement
  • Custom Requirements - Discuss advanced features and custom solutions