Solved

Include "continue shopping" link in form/newsletter flow?

  • 6 December 2021
  • 4 replies
  • 42 views

Badge
  • New Participant
  • 4 replies

I have a popup with a promise of a discount code for newsletter subscribers on all of my product pages. On submission, the user then enters my “welcome to the newsletter” flow. The coupon code is added to the email and it works perfectly.

 

I’d like to add a “continue shopping” button with a link to the product page where they submitted the form so the user can simply copy the coupon code and click to keep shopping. I’ve tried the {{ event.URL }} variable, but since the event that triggered the flow is the form submission (not a product view), it seems the event has no URL.

 

Any ideas?

icon

Best answer by alex.hong 7 December 2021, 00:52

View original

4 replies

Userlevel 6
Badge +43

Hey there @cfen,

Thanks for posting to the Community! Let’s see if we can figure out what might be going on together.

Customer who have tried to add a continue shopping button would see issues depending on how their flow and the flow trigger is set up. For example, the {{ event.extra.checkout_url}}​​dynamic tag can only be used with "started checkout" trigger. That tag does not exist in the Added to Cart event. Added to Cart only shows 1 product/1 item and so it will only provide the data for that single item, not an entire cart. Only Started Checkout event will show the entire cart. An added to cart flow, you will want to use {{ event.URL }}​instead to take the customer to the item they added to cart.

You would have to find a way to log the page that they had last visited, and keep that data somewhere so that you could recall it for a button. Most continue shopping buttons were implemented with an add to cart or checkout as opposed to signing up for a newsletter. On the Shopify community, I found documentation regarding this and how it’s usually off a checkout event. However, it looks like you can code a way to take a customer back to their last viewed collection. I would try look through this doc and see if that helped and let us know if you come across anything or have questions!
 

Thank you!
Alex

Badge

I appreciate the response, but neither of the docs are helpful for my use case. I believe the issue is simply a Klaviyo limitation that event variables in Klaviyo are relative to the flow trigger.

 

I have a “continue shopping” button on a browse abandonment flow and it works because the flow trigger is “viewed product,” which includes the URL the user viewed. By contrast, my newsletter flow is a “subscribed to” trigger, which does not include the URL the user viewed.

 

My desired workflow is:

  1. User visits a product page (for example, Bob’s Cool Gadget)
  2. Klaviyo newsletter popup fires offering a discount code when user signs up.
  3. User signs up, enters newsletter flow.
  4. User checks their inbox, sees code, and clicks a “continue shopping” button that takes them back to the product they first viewed (Bob’s Cool Gadget).

Without knowing the URL the user was on when they filled out the form, the best we can do in that email is point the user back to the home page and expect them to search to find the product again. 

Userlevel 2
Badge +5

Hey @cfen
For the workflow that you have outlined above, it can be achieved by using person.ViewedItems as a data source in a dynamic table. With the above data feed, you can not only add the url but also the name, image and price of the previously viewed products for the user. 


Since person.ViewedItems will populate a list of items previously viewed by the subscriber, I would recommend using ‘slice’ in data source to limit the no. of outputs in your email. 


You can also check out the guide here for inserting Recently Viewed Items in a campaign/flow email: How to Insert Recently Viewed Items into an Email

 

Please let me know if that was helpful, 

Thanks,

Sourabh

Badge

Thanks, @sourabh! Unfortunately, this doesn’t quite get us there because Viewed Product is only fired when the user is cookied and has a Klaviyo profile. In our case, we are showing the popup to new users (no Klaviyo profile) only, so when they visit the product page and fill out and submit the form, the Viewed Product event will not fire.

 

From what I can tell, the only event that fires before they fill out the form is Active on Site. I see the Active on Site event includes a “page” parameter with the URL the user visited. Is it possible to pull in the page parameter from the Active on Site event in an email flow?

 

Thanks,

Chris

Reply