Code preference:
Curl
Ruby
Php
Python
Node.js
C#
Java

Track Links

Track link enables you to track click events on various links on your website. We have inserted a small timeout so that there is enough time to log the event. Otherwise page would change before trackLink is called.

Here’s a basic example, along with trackLink method signature.

Suppose you want to target all your users who have downloaded a pdf file containing casestudy A on any given topic. If the link to download the file has following html source

Download Casestudy A

Then you can trigger a trackLink event, every time someone downloads the file, using following code.

Javascript Example

sendinblue.trackLink(link,[properties])

Here link is DOM element you want to track clicks on. In our case it is the anchor tag with id “download_casestudy_a”. You can also pass an array of link elements (mandatory). Properties is an optional json object.

PHP Example:

Download PHP API Wrapper

CURL Example: