Tags: Auto-Tag, Orders, Referral
Have your traffic sources refer customers using ?ref=referral-code-here URLs (using the query parameter of your choice), then use this task to automatically tag each customer's order according to the referral value they arrived with. Optionally, tag the customer as well.
- View in the task library: tasks.mechanic.dev/tag-orders-by-url-referrer
- Task JSON, for direct import: task.json
- Preview task code:
{
"query_parameter_name__required": "ref",
"cart_attribute_name__required": "Referral code",
"tag_customer_with_parameter_value__boolean": false,
"only_tag_the_customer_for_their_first_order__boolean": false
}
Learn about task options in Mechanic
shopify/orders/create
Learn about event subscriptions in Mechanic
Have your traffic sources refer customers using ?ref=referral-code-here URLs (using the query parameter of your choice), then use this task to automatically tag each customer's order according to the referral value they arrived with. Optionally, tag the customer as well.
This task adds JavaScript to your storefront, which adds referral parameters (using the query parameter of your choice) to the customer's cart (using the cart attribute name of your choice). (Referral values are saved in a browser cookie for one year.) When the corresponding order is created, this task copies the cart attribute over to the order's tags. Optionally, select to have the value applied to the customer as a tag as well.
Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.
Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.
Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!