Introduction
To keep customer data up-to-date, you (perhaps) use an update page. A form where customers can update their own information - such as an email address. This page can be integrated into a campaign in Deployteq, so that customers always have access to their own data. But of course, you want all of this to seamlessly integrate with your own website. We'll briefly explain how you can best achieve this.
Note: This principle also applies to an unsubscribe page, but in this example, we'll focus on an update page.
Requirements
What do you need? Firstly, a page on your own website where the entire process will take place. Let's take, for example: "https://www.yourdomain.com/update" and an update page in Deployteq. On this page, an iframe needs to be embedded where the Deployteq campaign will be placed. How to best accomplish this is not covered here, but you can achieve this using JavaScript or through a server-side script like PHP. Next, you need a link from the email to the update page. After clicking 'update' from the email, the customer should land on the update page. However, just the link to the page 'https://www.yourdomain.com/update' is insufficient. In Deployteq, it's not known who the customer is that lands on that update page. And without customer data, no update form can be displayed. Therefore, customer data must be included.
Step 1: Sending Customer Data
Customer data is sent along by adding a campaign object link as a variable to the URL of the update page. For example: http://www.yourdomain.com/update?Clang_url={{objectlink name='unsubscribe' campaignid='10' objectid='2' flowid='0'}}
<a href="http://www.yourdomain.com/update?Clang_url={{objectlink name='Unsubscribe' campaignid='10' objectid='2' flowid='0'}}">the link</a>
The URL to the update page is followed by a question mark. After the question mark, the variable with a value is specified. In this example, the variable name is 'Clang_url'. The value is a campaign object link. This campaign object link results in a myclang.com URL containing customer data and the information of the Deployteq update campaign.
Step 2: Integrating the Update Page into Your Website
Now the i-frame must be filled with that myclang.com URL. For this, a function is needed that retrieves and validates the myclang.com URL to then be able to place it in the src="" attribute of the i-frame. Such a function can be written in PHP or JavaScript.
As mentioned, the function must validate the value of the variable 'Clang_url'. The validation must check if the variable contains a URL and if the URL is actually a myclang.com URL. If this is not the case, because a user manually changes the value of the variable 'Clang_url', unexpected results may be displayed in the i-frame.
Once the script has validated the URL, the Clang URL is written to the src attribute of the i-frame. This way, the correct update or unsubscribe campaign with customer data is loaded into the i-frame. Deployteq has a JavaScript function available for this purpose. This function validates the variable 'Clang_url', and it is possible to specify a 'default' value if the validation fails so that nothing unwanted is shown in the i-frame.
An example with an explanation of this function can be found in the accompanying file "setFrame_v3.html". If you are using a CMS and do not have access to the head and/or body tag, you cannot use this version of the JavaScript solution. Instead, use the solution provided in the document "setFrame_alternative.html".
Name | Version | Published |
---|---|---|
setFrame_alternative-en.html | 1 | 2024-03-26 17:25 |
setFrame_v3-en.html | 1 | 2024-03-26 17:25 |