Skip to main content
Answered

Is there a way to capture a visitor's current page as an attribute?


Patrick H12
Forum|alt.badge.img

Basically I want to show a banner to users letting them know the app has been updated. I want to add a link action to perform a hard refresh of the current page. So I’d like to use something like {current_page}?app=refresh. 

Best answer by Daniel M15

Hey @Patrick H12! Daniel from Customer Support Engineering here 🔧 

 

We don’t surface the user’s current page URL as a dynamic variable, however, you should be able to achieve this by:

  1. Setting up a custom attribute “current URL”.
  2. Populating this attribute with the current page URL in your login snippet, for each page that the Messenger is installed on.

That way, each time the user ‘ping’s us (i.e., when they log in or are updated), you’ll know the most recent URL they visited. You can use this new custom attribute then as a dynamic variable in your messaging 🙌 

 

Hope this helps!

View original
Did this topic help you find an answer to your question?

2 replies

Daniel M15
Employee
  • Employee
  • 240 replies
  • Answer
  • March 29, 2023

Hey @Patrick H12! Daniel from Customer Support Engineering here 🔧 

 

We don’t surface the user’s current page URL as a dynamic variable, however, you should be able to achieve this by:

  1. Setting up a custom attribute “current URL”.
  2. Populating this attribute with the current page URL in your login snippet, for each page that the Messenger is installed on.

That way, each time the user ‘ping’s us (i.e., when they log in or are updated), you’ll know the most recent URL they visited. You can use this new custom attribute then as a dynamic variable in your messaging 🙌 

 

Hope this helps!


When I look at the Audience Rule section, I see a “standard attribute” place holder called “Current Page URL”, it seems like that is expected to give me the URL of the page the customer is on. However I dont know where I can see what is being passed into that attribute.

Anyone used this before ?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings