Posts

Bringing goal triggering and engagement plans together

Afbeelding
Engagement plans This blog focuses on Sitecore 8.2.x but may still apply to Automation plans in Sitecore 9, although code samples will not work, the general idea remains the same. With this implementation I aimed to enable marketers to trigger engagement plans upon goal triggering in their website. It is already possible out of the box to enroll a visitor in an engagement plan on WFFM form submission, manually or through EXM campaigns. However I wanted to enable our marketers to have more flexibility. For this I designed a mechanism that allows a marketer to hook up Sitecore goals to engagement plans. In this way a marketer can select an engagement plan and state that a user should be enrolled in upon triggering a Sitecore goal.  Item definitions  I started by making templates to enable the marketer in selecting his Sitecore goals and engagement plans to enroll the visitor in. With this setup there is now a connection between goals and plans. A marketer c...

WFFM and Processing server role

Server roles and WFFM A while a go I ran into an issue with WFFM in a setup where we had a separate processing server in our Sitecore server topology. We experienced issues with submitted WFFM data not always appearing in xDB, reports and contact lists. After lots of investigation and debugging, it turned out the Sitecore installation document for WFFM on Sitecore 8.2 update 7 is not correct. It tells you to install the following assemblies in your processing server: \Website\bin\Sitecore.WFFM.dll  \Website\bin\Sitecore.WFFM.Analytics.dll \Website\bin\Sitecore.WFFM.Abstractions.dll The missing piece here, is that you also need to deploy the  Sitecore.Forms.Core .dll to this instance, otherwise the WFFM events in your eventqueue will never be picked up by your processing server. Also your contact lists you want your WFFM contact indexed on will not work. Hope this will help someone that runs into the exact same issue.

Sitecore campaigns and UTM tracking unified

Afbeelding
Sitecore and UTM  A lot of blogs have been written about Sitecore vs Google Analytics and how they can be complimentary. In many of the implementations I have seen, marketers use these tools side by side.  As marketers seem so fond of Google Analytics and have a hard time parting with it to only use Sitecore, I figured, why not make them work at the same time. Marketers seem to be more familiar with setting up campaigns using UTM than setting them up with custom parameters for Sitecore campaigns, so why not make Sitecore work with these UTM parameters as well.  So what I did is make it configurable in Sitecore to hookup UTM parameters to Sitecore campaigns. This blog shows how I did that. Setting up your templates I started by defining a template where you can tie these together. Field1: UTM Source key Single-line text to copy your UTM source key into Field2: Linked Campaign A droptree field with a query, something like this: query:/sitecore/syst...

How to support the GDPR requirements in your Sitecore solution

In the past months GDPR has been a hot topic at my clients and we have had to implement the different GDPR requirements at multiple clients. This involved not only educating everyone involved about what GDPR involves, what it means and how it should be interpreted but also how to support this in Sitecore implementations. A good starting point, that we also used is this nice stackexchange post . It gives an overview of the different touch points in Sitecore and an approach of fulfilling the requirements. This blog post tries to go one step further with some implementation examples, mainly targeted at Sitecore 8 prior to 8.2 update 7. This post does not cover all GDPR topics as some of them are more business and less implementation related, nor does it give full working code examples, but it gives a good indication on the major topics that need to be considered. This post may be updated in the coming period if I receive feedback, to make this a good and even more complete source of in...

Unwanted HTML elements in your Sitecore richtext fields

Custom save events to the rescue! I have been planning this blog for years maybe but kept postponing, but finally it is here after similar requests from our great Sitecore community. The problem I have solved in my projects in the past is the following: When editing rich text fields, the default behavior of the Sitecore Telerik control is to insert a bit too many HTML elements around your content. For example <p> tags you don't want there, <p> tags or divs around image that you embed in the rich text field etc.  At some point I was so annoyed by this and the bad HTML it produced, I decided to customize the item save event to clean up the resulting HTML. Below you will find my code, I hope you find it useful. Be aware this code has only been tested on Sitecore 7.x. While I expect it to also work for 8+, you better test for yourself whether nothing breaks. Also, extend to your own need, to create your own neat and clean HTML. /// /// Don't forget follo...

Sitecore reporting database rebuild issue

Help, I'm seeing guids in my reports! So I had this environment where my reports were missing data I was surely having in my xDB database. I double checked this. So my only conclusion was that at some point the reporting database was missing data and I needed to rebuild it. As my version is 8.2 update 5 I followed the manual from this link to the letter . Everything seemed to work ok, until I switched to the fresh reporting database and I started looking at my reports 😧 All goal names, page names etc. were displayed with their item ID guids and not there (display)names.  I checked the xhr call to the Sitecore api's and saw messages about segments not found and missing translations.  I figured ok, let's just rebuild indexes, rebuild links and hopefully things will start to work again. WRONG!! After some digging around I found out that at some point apparently my marketing definition have been redeployed setting the deploy dates of my segments to a date after many o...

FXM on Single Page Applications

Pushing route visits I had a usecase where I needed to use FXM in a non-Sitecore Single Page Application. By default, FXM only supports loading its script on page load to push a page visit to Sitecore. However, for an SPA this is not very helpful since after the initial load of the APP it only changes routes and will not push events to FXM. So to support pushing route visits from the SPA to Sitecore analytics I made some slight modifications to the standard FXM beacon script to enable the SPA to push a visit to a route to Sitecore. Of course within the SPA this needs to be supported, so the default beacon script needs to be loaded and below PushRouteEvent method called on each route visit. function PushRouteEvent(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == XMLHttpRequest.DONE) { if (xmlhttp.status == 200) { document.getElementById("myDiv").inner...