Top Posts
ClickDimensions – Middle Ware
PowerPlatform / Dataverse – Five Layers of Security
Solution Framework Fundamentals
Solution Strategy
FLOW – The Workflow Replacement
Power Automate: Your UI testing companion – Part...
Updates Delayed
Build the Future
Learn more about me…
Power Automate Patterns: Scottish Summit 2020
Dave Burrell
  • Home
  • Power Automate
  • Power Platform
  • D365
  • Solution Architecture
  • Lifestyle
  • About Me
  • Contact Me
Dynamics 365

ClickDimensions Cookie Challenge

by Dave Burrell 2nd January 2019
by Dave Burrell 2nd January 2019
0FacebookTwitterLinkedinRedditWhatsappEmail
496

I have recently been working with a client who is implementing ClickDimensions marketing automation solution. Part of the solution allows website form captures to be created within Microsoft Dynamics CRM as either a lead or a contact.

Overview

ClickDimensions form handling after submission is fairly limited in terms of what happens once the user clicks on submit. Currently there are two outcomes:

The user is redirected to a static success page or a static error page.

In the world of internet marketing a static page fails to meet the needs of more advanced websites. The ideal is to be able to redirect to relevant content based on what the user has submitted.

In order to change the action of the form you have to use Progammatic Form Capture.

The ClickDimensions Cookie Challenge


Programmatically post the data using server side code. In order to implement this scenario, you must provide special parameters to the posted data which the Form Capture expects. These are:a. Visitor Key (parameter name: cd_visitorkey)

ClickDimensions

Accessing the details of a cookie is easier said than done this became apparent with the number of people looking to achieve the programmatic form capture described by ClickDimensions. I will go into more detail in another post on how to process the form – this article is simply around the extraction of the Visitor Key from the cookie.

The ClickDimensions cookie is question is called “CUVID” which contains a unique visitor ID.

CUVID Cookie

This cookie is typically written to the browser upon the first visit to the site from that web browser. If the cookie has been deleted by the browser operator, and the browser subsequently visits the site, a new __cuvid cookie is written with a different visitor unique ID. This cookie is used to determine unique visitors to the site and it is updated with each page view. Additionally, this cookie is provided with a unique ID that the application uses to ensure both the validity and accessibility of the cookie as an extra security measure.

The solution was to use some JavaScript to read the cookie content.

<script>
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1);
if (c.indexOf(name) != -1) return c.substring(name.length,c.length);
}
return "";
}
var visitorkey = getCookie("cuvid");
</script>

This reads the CUVID from the cookie which can then be used. I wrote this into a hidden field on the form using.

document.form1.visitkey.value = visitorkey
ClickDimensions
0 FacebookTwitterLinkedinRedditWhatsappEmail

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

Dave Burrell

Hey! I am Dave Burrell a Power Platform Solution Architect. I am an evangelist for all things Power Platform and love nothing more than a #LowCodeNoCode implementation.

previous post
Merry Christmas
next post
Dynamics 365 April ’19 – Key Dates

You may also like

ClickDimensions – Middle Ware

14th January 2019

About Me

About Me

Power Platform Evangelist

Hey! I am Dave Burrell a Power Platform Solution Architect. I am an evangelist for all things Power Platform and love nothing more than a #LowCodeNoCode implementation.

Lets be Social!

Facebook Twitter Instagram Linkedin Youtube Email

Quote

Revolutions begin with Community!

Recent Posts

  • Power Automate: Protect your Flow Run History 28th September 2021
  • Building the Future: Power Platform for Girl Guiding 22nd September 2021
  • Build the Future 18th August 2021
  • Power Platform Community – Resources! 12th August 2021
  • PowerFX – A Game Changer! 18th July 2021
  • Facebook
  • Twitter
  • Instagram
  • Linkedin
  • Youtube
  • Email

@2021 - All Right Reserved. Designed and Developed by Dave Burrell


Back To Top
Dave Burrell
  • Home
  • Power Automate
  • Power Platform
  • D365
  • Solution Architecture
  • Lifestyle
  • About Me
  • Contact Me
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok