Is there a way to e.g. access the segment of a visitor coming from an email in our CMS to personalise content?
Initially I had thought of e.g. adding segment data as url parameters to links in Klaviyo emails, which we can then use in the CMS. Is it possible to access segments as template tokens in email design so visitors to our site arrive at parameterised URLs?
Best answer by cassy.leeView original
Hi there. Anyone have any ideas on this?
To be clear, the code snippet I showed above indicates how I’d query a profile for a segment in a template, not how I‘d subsequently attach the url parameter. This is probably obvious, but...
@cassy.lee @Paul S thanks for your answers.
I am not hoping to “track traffic from email in addition to what segment that user is in”, I am hoping to access the user’s segment in our CMS as the user comes from an email. So:
As you say, importing segment members by CSV is one way to do this on some CMS’s, but our CMS doesn’t have user logins/cookies that recognise users by email. Unless you mean we can use the Klaviyo cookie somehow? (Your link on Segment Acquisition doesn’t seem so work, maybe that would explain it). In any case, segment export is laborious and would need to be repeated on segment update, whilst I’m hoping for a simple, dynamic solution.
url_params seem easiest to me as we could quickly create a segment, add the param, and make blocks on our site recognise url params.
I tried to do that in Klaviyo like this:
which is somewhat how we set things up in our preference center Hosted Page i.e. a contact’s lists are available to query in the template. (Related: I am having problem accessing simple custom properties in the template too
which might be the issue – I’m following this:https://www.klaviyo.com/docs/email-tags ).
In sum, it’d be great to attach segment data to in-email urls to assist with personalisation. Is this possible?
@Mailing, @Paul S and/or other Community members may have a different opinion on this, but if I understand your question correctly, you’re looking to track traffic from email in addition to what segment that user is in?
Thanks for providing some additional context to your CMS.
If you are trying to track traffic from email, UTMs will work great for this purpose. You can create a UTM parameters for the emails that would only show up in Wagtail.io. If you are looking to transfer a specific segment to your CMS, you can export segment members as a CSV file. It’s worth noting that segments grow/shrink over time, so this may fluctuate.
To configure your accounts UTM tracking, I recommend reviewing this UTM guide. Additionally, this guide on How to Segment by Acquisition source might also be helpful.
@Paul S ,
I have no segments created yet, this is a theoretical question.
Our CMS is https://wagtail.io which has a segmentation module that allows query-parameter based content design https://wagtail-personalisation.readthedocs.io/en/latest/default_rules.html#query-rule
@Mailing, so just to ask some clarifying questions, were you able to get your segments created using the url parameters?
Also out of curiosity, what CMS are you utilizing on your site. It may be possible but any additional information that you could provide would be helpful in this instance.