Skip to content

Clicked links can help optimize you email engagement rate by showing you how different Sections, images or Calls-to-action affect how your recipients interact with your emails.

As a result, you may want to use /statistics/link-click to retrieve activity information based on the links in your campaign templates. With this endpoint you can track both unique clicks and total click events, as well as retrieve the URL and its position within the template. It gives you valuable insight into what links are used more often than others, possibly showing correlation between position / design and link popularity.

Example

# View : View statistics for total and unique clicks for each clicked URL in a campaign email
curl -s \
	-X GET \
	--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
	  https://api.mailjet.com/v3/REST/statistics/link-click?CampaignId=$Campaign_ID

API Response

{
  "Count": 1,
  "Data": [
    {
      "URL": "https://www.google.fr/",
      "PositionIndex": 1,
      "ClickedMessagesCount": 2,
      "ClickedEventsCount": 2
    }
  ],
  "Total": 1
}