Hello!
Could you please tell me how i can increment (increase) the value of the attribute in customer.io ?
for example i have an attribute, called ‘number_of_page_views’ and i want it to increase it’s value by 1, every time user logins the page. (1,2,3,4 etc).
add a counter to an attribute
Hey Alex,
as long as you send an event or webhook to CIO in case the user logs in, you can do the following:
Create a campaign and simple add “create or update a person” in the workflow. There you can select your attribute number_of_page_views
and use liquid to increase the value by 1 with the filter “plus” (in my case it named the attribute page_views
):
Hope that helps,
Felix
Hey, Felix!
i did according to your advice.
It works fine if person has number_of_page_views attribute, but in case it does not have it, there is an error.
In case attribute number_of_page_views does not exist yet, we would like it to be created and incremented.
Can you please give an advice how we could fix this ?
Here are the screenshots of my current configuration,
Thanks in advance!
{% if customer.number_of_page_views != blank %}
{{customer.number_of_page_views | plus: 1 }}
{% else %}
{{ 1 }}
{% endif %}
Best,
Felix
Reply
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.