Solved

Map webhook event information to specific link in email

  • 12 November 2023
  • 4 replies
  • 50 views

I’ve set up a webhook so I get an event when en email is opened or a link in an email is clicked. I would like to map this information to a specific email and a specific link in the email. Is there a way to retrieve the message templates and the links in them?

icon

Best answer by hjhlarsen 13 December 2023, 00:22

View original

4 replies

Userlevel 3

Hi @hjhlarsen

You can use a webhook action to your workflow and add the specific link into a profile attribute.

By doing so, you can leverage Liquid to retrieve the links and add them into your email templates. 

 

You can learn more about it here: https://customer.io/docs/journeys/webhooks-action/.

 

Best,

Mau

That’s not what I’m looking for. I’ve set up a webhook in Data Pipelines, so I get notifications when users click links in emails we have sent out via customer.io. The data we get may look like this:

{
    "event": "Email Link Clicked",
    "properties":
    {
        "action_id": 88,
        "campaign_id": 1,
        "customer_id": "xxxx",
        "delivery_id": "xxxx",
        "href": "https://xxx.xxx.xxx",
        "journey_id": "xxxx",
        "link_id": 2,
        "recipient": "john@doe.com",
        "subject": "Welcome to your new workspace",
        "userId": "xxxz"
    },
    "type": "track",
}

This data contains a link_id, I would like to map that to a specific link in our message template. I can probably do that manually, but would prefer to automate that process.

Hans

Unfortunately customer.io doesn’t have APIs that allows me to retrieve my email templates and determine which linkIds are associated to my links and buttons in the email. It would be helpful with such APIs...

I believe the event attribute can be mapped to a profile attribute and then you can use liquid to have it in your email templates.

Reply