We’re running Klaviyo on a WooCommerce site. We have the Klaviyo SDK running.
At the moment the customer places an order and reaches the “Thank You” page, how do we add a custom variable into the payload sent to Klaviyo so that it gets into the customer’s Klaviyo profile?
More specifically, we are trying to push into Klaviyo a specific cookie value we set in the customer’s browser. It’s easy enough to get the cookie value (whether in JavaScript or PHP). But how do we hook into the payload that Klaviyo sends with the ‘order complete’ event and add our custom value / property?
We weren’t able to find an answer in Klaviyo’s documentation.
Just to clarify, do you already have a Placed Order metric firing, and you want to create an entirely new metric? Or are you hoping to pack in an additional profile property into the Placed Order metric that already exists?
Here’s our Developer Documentation on the recommended structure of a custom Placed Order metric:
Under the “profile” tag, you can see that there are profile properties listed such as "$first_name": "John", "$last_name": "Smith". You can add additional profile properties here that will be passed into the profile upon the order firing. This method may take some personalized development help, so if you’re interested, you can always reach out to one of our official Klaviyo Partners here.
If you wanted to accomplish the basis of this use case without extensive development, you could also use a Klaviyo flow in tandem with the native Placed Order product. First, you would navigate to Flows > Create Flow > Create From Scratch, and then once you’re in the editor, you could choose the Placed Order metric as the trigger:
Then, you can just drag in an Update Profile Property block, and add Create a New Property. Now, whenever someone places an order, they will be directed through this flow and a new property will be added to their profile.
If I misunderstood your use case, please don’t hesitate to let me know, but I hope this helps!
Just to clarify, do you already have a Placed Order metric firing, and you want to create an entirely new metric? Or are you hoping to pack in an additional profile property into the Placed Order metric that already exists?
Here’s our Developer Documentation on the recommended structure of a custom Placed Order metric:
Under the “profile” tag, you can see that there are profile properties listed such as "$first_name": "John", "$last_name": "Smith". You can add additional profile properties here that will be passed into the profile upon the order firing. This method may take some personalized development help, so if you’re interested, you can always reach out to one of our official Klaviyo Partners here.
If you wanted to accomplish the basis of this use case without extensive development, you could also use a Klaviyo flow in tandem with the native Placed Order product. First, you would navigate to Flows > Create Flow > Create From Scratch, and then once you’re in the editor, you could choose the Placed Order metric as the trigger:
Then, you can just drag in an Update Profile Property block, and add Create a New Property. Now, whenever someone places an order, they will be directed through this flow and a new property will be added to their profile.
If I misunderstood your use case, please don’t hesitate to let me know, but I hope this helps!
By clicking “Accept All Cookies,” you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.
Privacy Preference Center
Your Privacy
Strictly Necessary Cookies
Performance Cookies
Functional Cookies
Targeting Cookies
Site Analytics
Your Privacy
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
Privacy Notice
Strictly Necessary Cookies
Always Active
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
Performance Cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
Functional Cookies
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
Targeting Cookies
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Site Analytics
These cookies record your visit to our website, and are used to track your visit including information such as: web page interactions (clicks, hovers, focus, mouse movements, browsing, zooms and other interactions), referring web page/source through which you accessed the Sites, heatmaps and scrolls, screen resolution, ISP, and statistics associated with the interaction between device or browser and the Sites. If you are accessing our Services with a European IP address, you have been asked to consent to the use of these cookies (you are free to deny your consent).