Optimizely
Aug 1, 2011
visibility 5271
star star star star star
(0 votes)

Weather Criterion

Apparently British people talk about weather a lot. So wouldn’t it be good to personalise the content based on the weather of the visitor’s location?  Your site visitor had a bad day before visiting your site, and found out that at least it is still sunny outside and he can go to the beach with the family after work Smile

The Custom Criterion uses Google Weather API and expect the user profile to have a ZipCode property. If you are trying it on the Alloy Tech site, set up the workroom component, and locate the file ~/templates/AlloyTech/Units/Placeable/PersonalSettings.ascx. You can easily modify the code to set/get user’s ZipCode information.

A typical zip code in UK, Sweden and USA is such as

  • EC1N 8SS
  • 103 86, Stockholm
  • 60181

Very quick and dirty project as part of my new exposure to EPiServer personalisation. Now you have the source code so let’s see your imaginations!

See the code: Download

.
Aug 01, 2011

Comments

error Please login to comment.
Latest blogs
Writing a Catalog Entry the Low-Level Way. Part 2: The Writer

Upserting a catalog entry through CatalogContext and MetaDataPlus: ContentGuid, the meta class seam, response groups, and a create path that rolls...

Stanisław Szołkowski | Oct 7, 2026 |

Migrate Optimizely DAM Assets from CMS 12 to CMS 13

Sites that used Optimizely DAM in CMS 12 need their asset references moved to the new Graph-backed content sources after upgrading. CMS 13.3 includ...

Bartosz Sekula | Oct 6, 2026

Scheduler Delegation: Using Optimizely DXP Infrastructure for Queued Processing

At SYZYGY Techsolutions, we support Optimizely DXP projects at scale, so continuously identifying unique ways to optimize the application is an...

Mike | Oct 6, 2026