widgets - Conditional Tags Based on Previously Viewed Posts

admin2025-06-05  2

I was looking at the Conditional Tags Archive and was wondering if it's possible to show a widget depending on different posts / pages a visitor has previously viewed.

For example, if I had a car blog and the blog layout contains a sidebar widget that will display a promotion.

This promotion will vary depending on the types of posts a visitor has viewed.

So if a visitor was looking at posts that have to do with the Mazda brand, I'll be able to write a condition for the widget in the sidebar that reads, if he visited blog post X, Y or Z, then this widget will display a promotion for a Mazda Car Dealership near him.

Same for other car types and promotions.

I'm guessing some would it'd be impossible, but I was thinking if tracking a visitor with cookies, it would seem like a viable idea.

Thoughts or suggestions on where to go from here?

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749112506a316466.html

最新回复(0)