Skip to content

Commit 1b01b48

Browse files
authored
Merge pull request #6492 from umbraco/ums/duplicates
Update duplicates
2 parents 479b7ff + c6e61f1 commit 1b01b48

File tree

4 files changed

+301
-166
lines changed

4 files changed

+301
-166
lines changed
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
---
2+
description: >-
3+
Add extra uMS functionality to your website using the templates detailed in
4+
this section.
5+
---
6+
17
# Marketing Resources
28

3-
As a marketer you want to interact with your website visitor without the help of a developer.
4-
In this section we listed free templates to jump start your onsite visitor interaction.
9+
As a marketer, you want to interact with your website visitors without the help of a developer.\
10+
Find in this section, templates to jump-start your onsite visitor interaction.
511

6-
With just the help of these generic CSS and JavaScript templates you will be up-and-running within 5 minutes!
12+
With the help of these generic CSS and JavaScript templates, you will be up and running within 5 minutes.
Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1+
---
2+
description: >-
3+
To boost the marketing activitites on your website, you can add an exit intent
4+
popup to you website. Find a template for the popup in this article.
5+
---
6+
17
# Generic Exit Intent Popup Template
28

3-
Enjoy this easy-to-use exit intent overlay template and start boosting your marketing activities right away!
4-
No help is needed from a developer, everyone can set this one up. Apply some personalization to make the exit intent overlay even more relevant for your audience.
9+
Use this template to start boosting your marketing activities. The template can be set up and used without help from a developer.
510

6-
Please make sure that you've installed [the clientside script](/analytics/clientside-events-and-additional-javascript-files/additional-measurements-with-our-ums-analytics-scripts/) of the uMarketingSuite on your website to make sure you can use the full functionality!
7-
8-
*The resources needed for this exit intent overlay are shared below the screenshot. ![uMarketingSuite - Leave intent overlay]()*
11+
It is recommended to personalize the popup to make it even more relevant for your specific audience.
912

10-
## JavaScript & CSS
13+
{% hint style="info" %}
14+
Install [the client-side script](../../../../../analytics/clientside-events-and-additional-javascript-files/additional-measurements-with-our-ums-analytics-scripts/) on your website to benefit from the full functionality of the template.
15+
{% endhint %}
1116

12-
Copy and paste this JavaScript into uMarketingSuite and your overlay is ready to go.
13-
Don't be scared to play around with the colors and font properties. If things go wrong, this copy is here to reset your styling ;-)
17+
![uMarketingSuite - Leave intent overlay]()\*
18+
19+
## JavaScript & CSS
1420

15-
[Download CSS & JavaScript.](/media/kxmpljfv/ums-exit-intent-overlay.zip)
21+
Copy and paste this JavaScript into uMS and your overlay is ready.
1622

17-
## Questions or ideas?
23+
Feel free to play around with other properties. You can always use the following code to reset the styling.
1824

19-
Do you have improvements or requests for other templates that you would like to use? Feel free to reach out to [[email protected]](mailto:[email protected]?subject=Marketing%20Resources%20suggestion "Reach out to uMarketingSuite with your suggestion"). We would love to hear from you!
25+
[Download CSS & JavaScript.](../../../../../media/kxmpljfv/ums-exit-intent-overlay.zip)
Lines changed: 137 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,117 @@
1+
---
2+
description: >-
3+
To boost the marketing activitites on your website, you can add a uMS popup to
4+
you website. Find a template for the popup in this article.
5+
---
6+
17
# Generic Popup Template
28

3-
Enjoy this easy-to-use popup template and start boosting your marketing activities right away!
4-
No help is needed from a developer, everyone can set this one up. Apply some personalization to make the popup even more relevant for your audience. [Read this blog](https://www.umarketingsuite.com/blog/a-personalized-popup-in-5-minutes/ "Setting up a personalized popup within 5 minutes with uMarketingSuite") if you want to set up a personalized popup within uMarketingSuite.
9+
Use the popup template to start boosting your marketing activities. The template can be set up and used without help from a developer.
510

6-
Please make sure that you've installed [the clientside script](/analytics/clientside-events-and-additional-javascript-files/additional-measurements-with-our-ums-analytics-scripts/) of the uMarketingSuite on your website to make sure you can use the full functionality!
7-
8-
*The resources needed for this popup are shared below the screenshot. ![uMarketingSuite Popup example]()*
11+
It is recommended to personalize the popup to make it even more relevant for your specific audience. [Read this blog](https://www.umarketingsuite.com/blog/a-personalized-popup-in-5-minutes/) if you want to set up a personalized popup within uMS.
12+
13+
{% hint style="info" %}
14+
Install [the client-side script](../../../../../analytics/clientside-events-and-additional-javascript-files/additional-measurements-with-our-ums-analytics-scripts/) on your website to benefit from the full functionality of the template.
15+
{% endhint %}
16+
17+
![uMarketingSuite Popup example]()\*
918

1019
## JavaScript
1120

12-
This popup won't affect the styling of your existing page or website. To be able to apply the popup we need some JavaScript to insert the popup HTML in your existing content. In addition, we would like visitors to have the possibility to close the popup. This coding is also added.
13-
14-
Now simply copy and paste the javascript below into uMarketingSuite.
15-
16-
var popupTitle = "Popups do convert!"; // The title of your popup
17-
var popupText = "The average conversion rate of a popup is 3.09%So, if you have 1000 visitors on a daily basis, each month 927 visitors will convert through this popup."; // The text of your popup
18-
var popupbuttonText = "I want this!"; // The button text
19-
var popupButtonLink = "https://www.umarketingsuite.com/"; // The button link
20-
var popupButtonClose = "X"; // The close button text
21-
var popupName = "Popup1"; // Must be unique, used as analytics event and cookiename
22-
const useCookie = true; // Set this to true to use a cookie to hide the popup for visitors that closed the popup or clicked on the button.
23-
const cookieExpireDays = 30; // After how many days do you want this popup to re appear?
24-
25-
// Do no change anything below this line //
26-
const CookieService = {
27-
setCookie(name, value, days) {
28-
let expires = '';
29-
30-
if (days) {
31-
const date = new Date();
32-
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
33-
expires = '; expires=' + date.toUTCString();
34-
}
35-
36-
document.cookie = name + '=' + (value || '') + expires + ';';
37-
},
38-
39-
getCookie(name) {
40-
const cookies = document.cookie.split(';');
41-
42-
for (const cookie of cookies) {
43-
if (cookie.indexOf(name + '=') > -1) {
44-
return cookie.split('=')[1];
45-
}
46-
}
47-
48-
return null;
49-
},
50-
};
51-
52-
function checkCookie() {if (useCookie) { CookieService.setCookie(`ums` + popupName + `Shown`,true,cookieExpireDays);
53-
}};
54-
55-
function sendEvent(eventvalue) {ums("send", "event", "Popup", eventvalue, popupName);
56-
};
57-
58-
function hideModel() {const message = document.querySelector('.u-alert-message');message.remove();
59-
sendEvent('Closed');checkCookie();
60-
};
21+
This popup will not affect the styling of your existing page or website. Some JavaScript is needed to insert the popup HTML in your existing content to apply the popup. The code also includes an option for the visitor to close the popup.
22+
23+
Copy and paste the following JavaScript below into uMS.
24+
25+
```javascript
26+
var popupTitle = "Popups do convert!"; // The title of your popup.
27+
var popupText = "The average conversion rate of a popup is 3.09%So, if you have 1000 visitors on a daily basis, each month 927 visitors will convert through this popup."; // The text of your popup.
28+
var popupbuttonText = "I want this!"; // The button text.
29+
var popupButtonLink = "https://www.umbraco.com/"; // The button link.
30+
var popupButtonClose = "X"; // The close-button text.
31+
var popupName = "Popup1"; // Must be unique. Used as analytics event and cookiename.
32+
const useCookie = true; // Set this to true to use a cookie to hide the popup for visitors that closed the popup or clicked on the button.
33+
const cookieExpireDays = 30; // After how many days do you want this popup to re-appear?
34+
35+
// Do no change anything below this line //
36+
const CookieService = {
37+
setCookie(name, value, days) {
38+
let expires = '';
39+
40+
if (days) {
41+
const date = new Date();
42+
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
43+
expires = '; expires=' + date.toUTCString();
44+
}
45+
46+
document.cookie = name + '=' + (value || '') + expires + ';';
47+
},
48+
49+
getCookie(name) {
50+
const cookies = document.cookie.split(';');
51+
52+
for (const cookie of cookies) {
53+
if (cookie.indexOf(name + '=') > -1) {
54+
return cookie.split('=')[1];
55+
}
56+
}
57+
58+
return null;
59+
},
60+
};
6161

62-
function registerClick() {sendEvent('Clicked');checkCookie();
63-
};
62+
function checkCookie() {if (useCookie) { CookieService.setCookie(`ums` + popupName + `Shown`,true,cookieExpireDays);
63+
}};
6464

65-
var popupContent = `<div class="u-alert-message absolute"><article class="u-alert-content"><strong>` + popupTitle + `</strong><p>` + popupText + `</p><div class="u-alert-button-container"><a href="` + popupButtonLink + `" class="u-alert-button secondary" onclick="registerClick();">` + popupbuttonText + `</a></div></article><button id="js-close-alert" class="u-alert-close u-alert-button" onclick="hideModel();">` + popupButtonClose + `</button></div>`
65+
function sendEvent(eventvalue) {ums("send", "event", "Popup", eventvalue, popupName);
66+
};
6667

67-
const hasCookie = CookieService.getCookie(`ums` + popupName + `Shown`);if (!hasCookie) { document.body.insertAdjacentHTML('beforeend', popupContent);};
68+
function hideModel() {const message = document.querySelector('.u-alert-message');message.remove();
69+
sendEvent('Closed');checkCookie();
70+
};
71+
72+
function registerClick() {sendEvent('Clicked');checkCookie();
73+
};
74+
75+
var popupContent = `<div class="u-alert-message absolute"><article class="u-alert-content"><strong>` + popupTitle + `</strong><p>` + popupText + `</p><div class="u-alert-button-container"><a href="` + popupButtonLink + `" class="u-alert-button secondary" onclick="registerClick();">` + popupbuttonText + `</a></div></article><button id="js-close-alert" class="u-alert-close u-alert-button" onclick="hideModel();">` + popupButtonClose + `</button></div>`
76+
77+
const hasCookie = CookieService.getCookie(`ums` + popupName + `Shown`);if (!hasCookie) { document.body.insertAdjacentHTML('beforeend', popupContent);};
78+
```
6879

6980
## CSS
7081

71-
Now that we have our popup in place we would like to make it look a bit fancier. Copy and paste this CSS into uMarketingSuite and your popup is ready to go.
82+
Now that you have your popup in place you can update the look. Copy and paste the following CSS into uMS and your popup is ready.
7283

73-
You can change the font, colors and other properties at the top of the CSS code.
84+
You can change the font, colors, and other properties at the top of the CSS code.
7485

75-
Don't be scared to play around with other properties. If things go wrong, this copy is here to reset your styling ;-)
86+
Feel free to play around with other properties. You can always use this code to reset the styling.
7687

77-
:root {
78-
79-
/*
80-
Change these values to customize the looks of your popup
81-
If you need a color picker go to https://www.w3schools.com/colors/colors_picker.asp
82-
Click on 'Or Use HTML5' to use the colorpicker (the pipette icon)
83-
*/
84-
85-
--c-text: #000000; /* Text color */
86-
--c-font-text: system-ui, sans-serif; /* Text font */
87-
--c-size-text: 16px; /* Text size */
88-
--c-lh-text: 28px; /* Text line spacing */
89-
--c-title: #3444b2; /* Title color */
90-
--c-font-title: system-ui, sans-serif; /* Title font */
91-
--c-background: #ffffff; /* Popup background color */
92-
--c-radius: 20px; /* Popup border radius */
93-
--c-btn-text: #ffffff; /* Button text color */
94-
--c-btn-background: #11bc9b; /* Button background color */
95-
--c-btn-radius: 5px; /* Button border radius */
96-
--c-close-text: #cccccc; /* Close button text color */
97-
--c-close-background: #f2f2f2; /* Close button background color eaeaea*/
98-
--c-close-radius: 5px; /* Close button border radius */
99-
}
88+
```css
89+
:root {
90+
91+
/*
92+
Change these values to customize the looks of your popup
93+
If you need a color picker go to https://www.w3schools.com/colors/colors_picker.asp
94+
Click on 'Or Use HTML5' to use the colorpicker (the pipette icon)
95+
*/
10096

101-
/* Do no change anything below this line */
102-
.u-alert-message {
97+
--c-text: #000000; /* Text color */
98+
--c-font-text: system-ui, sans-serif; /* Text font */
99+
--c-size-text: 16px; /* Text size */
100+
--c-lh-text: 28px; /* Text line spacing */
101+
--c-title: #3444b2; /* Title color */
102+
--c-font-title: system-ui, sans-serif; /* Title font */
103+
--c-background: #ffffff; /* Popup background color */
104+
--c-radius: 20px; /* Popup border radius */
105+
--c-btn-text: #ffffff; /* Button text color */
106+
--c-btn-background: #11bc9b; /* Button background color */
107+
--c-btn-radius: 5px; /* Button border radius */
108+
--c-close-text: #cccccc; /* Close button text color */
109+
--c-close-background: #f2f2f2; /* Close button background color eaeaea*/
110+
--c-close-radius: 5px; /* Close button border radius */
111+
}
112+
113+
/* Do no change anything below this line */
114+
.u-alert-message {
103115
position: relative;
104116
background: var(--c-background);
105117
border-radius: var(--c-radius);
@@ -114,45 +126,45 @@ Don't be scared to play around with other properties. If things go wrong, this c
114126
transition: all 1s;
115127
font-size: var(--c-size-text);
116128
box-shadow: 2px 2px 30px rgb(0 0 0 / 25%);
117-
}
118-
119-
.u-alert-message.absolute {
129+
}
130+
131+
.u-alert-message.absolute {
120132
--sides: 60px;
121133
position: fixed;
122134
z-index: 1000;
123135
bottom: var(--sides);
124136
right: var(--sides);
125-
}
126-
127-
.u-alert-content strong {
137+
}
138+
139+
.u-alert-content strong {
128140
font-size: 1.2em;
129141
max-width: 90%;
130142
display: inline-block;
131143
font-family: var(--c-font-title);
132144
color: var(--c-title);
133-
}
134-
135-
.u-alert-content p {
145+
}
146+
147+
.u-alert-content p {
136148
margin: 10px 0 0 0;
137-
}
138-
139-
.u-alert-button-container {
149+
}
150+
151+
.u-alert-button-container {
140152
margin-top: 20px;
141153
display: flex;
142154
justify-content: flex-end;
143155
flex-wrap: wrap;
144156
margin-bottom: -5px;
145-
}
146-
147-
.u-alert-button-container > * {
157+
}
158+
159+
.u-alert-button-container > * {
148160
margin-bottom: 5px;
149-
}
150-
151-
.u-alert-button-container > *:not(:last-child) {
161+
}
162+
163+
.u-alert-button-container > *:not(:last-child) {
152164
margin-right: 5px;
153-
}
154-
155-
.u-alert-button {
165+
}
166+
167+
.u-alert-button {
156168
appearance: none;
157169
border: 0;
158170
background: var(--c-primary-surface);
@@ -165,19 +177,19 @@ Don't be scared to play around with other properties. If things go wrong, this c
165177
text-decoration: none;
166178
transition: filter 0.2s ease;
167179
cursor: pointer;
168-
}
169-
170-
.u-alert-button:hover,
171-
.u-alert-button:focus {
180+
}
181+
182+
.u-alert-button:hover,
183+
.u-alert-button:focus {
172184
filter: brightness(1.1);
173-
}
174-
175-
.u-alert-button.secondary {
185+
}
186+
187+
.u-alert-button.secondary {
176188
background: var(--c-btn-background);
177189
color: var(--c-btn-text);
178-
}
179-
180-
.u-alert-close {
190+
}
191+
192+
.u-alert-close {
181193
position: absolute;
182194
top: 10px;
183195
right: 25px;
@@ -186,9 +198,9 @@ Don't be scared to play around with other properties. If things go wrong, this c
186198
background: var(--c-close-background);
187199
color: var(--c-close-text);
188200
border-radius: var(--c-close-radius);
189-
}
190-
191-
@media (max-width: 48em) {
201+
}
202+
203+
@media (max-width: 48em) {
192204
.u-alert-message.absolute {
193205
max-width: 100%;
194206
width: 100%;
@@ -200,9 +212,9 @@ Don't be scared to play around with other properties. If things go wrong, this c
200212
width: 100%;
201213
text-align: center;
202214
}
203-
}
204-
205-
@keyframes showAnim {
215+
}
216+
217+
@keyframes showAnim {
206218
0% {
207219
opacity: 0;
208220
transform: scale(0.5);
@@ -211,8 +223,5 @@ Don't be scared to play around with other properties. If things go wrong, this c
211223
opacity: 1;
212224
transform: scale(1);
213225
}
214-
}
215-
216-
## Questions or ideas?
217-
218-
Do you have improvements or requests for other templates that you would like to use? Feel free to reach out to [[email protected]](mailto:[email protected]?subject=Marketing%20Resources%20suggestion "Reach out to uMarketingSuite with your suggestion"). We would love to hear from you!
226+
}
227+
```

0 commit comments

Comments
 (0)