Setting up an Action with custom code that sends user data to Customer.io’s API
The best way to send data to Customer.io is using custom code in an Action, that is Triggered when a user takes an action, such as entering their email or completing a purchase.
This is implemented using the Customer.io Pipelines API.
Set up Customer.io HTTP Source
Create a custom code Action
+ Add New Action
Add
Write your custom code
Add the following code to your Action:
If your Customer.io account is in the EU region, use https://cdp-eu.customer.io/v1/track
as the endpoint instead.
Add a Trigger for your Action
WHEN Page KEY user_info_page IS Completed
Add
Optional: Tracking Events
If you also want to track specific events in Customer.io, you can create an additional Action:
This is implemented using the Customer.io Pipelines API.
If your Customer.io account is in the EU region, use https://cdp-eu.customer.io/v1/track
as the endpoint instead.
WHEN Button KEY submit_button IS Clicked
Read more about writing Custom Code in Embeddables, including all the available arguments passed in to the function.
Read more about Customer.io’s APIs, including detailed information about available endpoints and data formats.
Setting up an Action with custom code that sends user data to Customer.io’s API
The best way to send data to Customer.io is using custom code in an Action, that is Triggered when a user takes an action, such as entering their email or completing a purchase.
This is implemented using the Customer.io Pipelines API.
Set up Customer.io HTTP Source
Create a custom code Action
+ Add New Action
Add
Write your custom code
Add the following code to your Action:
If your Customer.io account is in the EU region, use https://cdp-eu.customer.io/v1/track
as the endpoint instead.
Add a Trigger for your Action
WHEN Page KEY user_info_page IS Completed
Add
Optional: Tracking Events
If you also want to track specific events in Customer.io, you can create an additional Action:
This is implemented using the Customer.io Pipelines API.
If your Customer.io account is in the EU region, use https://cdp-eu.customer.io/v1/track
as the endpoint instead.
WHEN Button KEY submit_button IS Clicked
Read more about writing Custom Code in Embeddables, including all the available arguments passed in to the function.
Read more about Customer.io’s APIs, including detailed information about available endpoints and data formats.