Using Bip.Marketing Tracker

This page will help you get started with Bip.Marketing Tracker. You'll be up and running in a jiffy!

x-tracker:
description: |

🔑 Tracker (BIP_VISITOR_ID)

The BIP tracker is a unique identifier used to link anonymous user behavior to identified leads.

It enables:

  • Tracking page views and clicks before identification
  • Linking historical behavior to a lead after signup
  • Cross-event attribution across campaigns and sessions

The tracker is automatically generated and managed by the BIP JavaScript snippet.


📦 Installation

Add the BIP script to your website:

<script
  bip-namespace="YOUR_NAMESPACE"
  src="https://js.bip.marketing/v1.0.0.js"
  async>
</script>

After loading, the tracker is available as:

window.BIP_VISITOR_ID

🚀 Usage Patterns

1. Anonymous Tracking (automatic)

The script automatically tracks:

  • Page views (/url-view)
  • Outbound clicks (/url-click)
{
  "type": "view",
  "source": "url",
  "tracker": "abc123xyz"
}

2. Lead Identification (recommended)

When a user submits a form:

fetch('https://api.bip.marketing/api/leads', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-bip-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    email: "[email protected]",
    name: "John Doe",
    tracker: window.BIP_VISITOR_ID
  })
});

This links all previous anonymous events to the identified lead.


3. Event Tracking with Tracker

{
  "type": "click",
  "tracker": "abc123xyz",
  "value": "https://example.com"
}

If leadId is not provided, the tracker will be used for association.


4. Campaign Trigger with Tracker

{
  "campaignId": "01ABC123",
  "lead": {
    "phone": "+5511999999999",
    "tracker": "abc123xyz"
  }
}

This allows creating/updating a lead and triggering a campaign in a single request.


💡 Best Practices

  • Always send tracker when available
  • Use it during lead creation to merge anonymous activity
  • Do not manually generate tracker values — rely on BIP JS
  • Store tracker in frontend context if needed (SPA, forms, etc.)

⚠️ Notes

  • The tracker is browser-based (device-specific until identification)
  • It is automatically persisted by the BIP script
  • It enables full behavioral tracking before user identification

What’s Next

Did this page help you?