For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Getting started
    • Overview
    • Quickstart
    • Authentication
    • Rate limits
  • Messaging API
    • Send transactional email
    • Send transactional SMS
    • Send transactional WhatsApp
  • Marketing Platform
    • Manage your contacts
    • Track website activity
    • Send WhatsApp campaigns
    • Weekly event exports
  • Webhooks
    • Getting started
    • Conversations webhooks
    • Payment webhooks
    • Marketing webhooks
    • Transactional webhooks
    • Loyalty webhooks
    • Batched webhooks
    • Secure webhook calls
    • Meetings and phone webhooks
    • Push notification webhooks
    • Sales CRM webhooks
  • Conversations
    • Getting started
    • Customize the chat widget
    • JavaScript API reference
    • REST API reference
    • Conversations webhooks
  • eCommerce
    • Activate eCommerce app
    • Manage product categories
    • Manage products
    • Manage orders
    • Coupon collections
    • eCommerce tracker events
  • Loyalty
    • Overview
    • Set up a program
    • Enroll members
    • Credit & debit points
    • Read member data
    • Best practices
  • Custom Objects
    • Custom objects management
  • Brevo tracker and events
    • Getting started
    • JavaScript implementation
      • Identify users
      • Track page views
      • Track link clicks
      • Track custom events
    • REST implementation
    • Legacy tracker documentation
    • Events
  • Accounts and settings
    • Senders and domains
    • User activity logs
    • External feeds
    • Invited users
LogoLogo
Help CenterAPI KeysStatusSign In
On this page
  • Example:
Brevo tracker and eventsJavaScript implementation

Track link clicks

Was this page helpful?
Previous

Track custom events

Next
Built with
Legacy Tracker Documentation

For the legacy tracker doc, check our guide here.

Use trackLink() to track clicks on links on your website:

1Brevo.push([
2 "trackLink",
3 link, /* mandatory */
4 properties /* optional */
5]);

Parameters:

AttributeDatatypeDescriptionValue
linkDOM elementThe DOM element you want to trackdocument.getElementById(‘download_casestudy_a’);
propertiesJSON objectDescribes the click context or the visitor’s state{ "title": "Page title" }

Implement trackLink after the tag

trackLink() requires DOM elements to be loaded before it runs. Implement trackLink() after the <body> tag and make sure the relevant DOM elements are already loaded.

Example:

1var link = document.getElementById('download_casestudy_a');
2
3var properties = {'casestudy' : 'A'}
4
5Brevo.push([
6 "trackLink",
7 link, /* mandatory */
8 properties /* optional */
9]);