forked from lytics/pathforajs-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinline-content-mode.js
55 lines (50 loc) · 1.72 KB
/
inline-content-mode.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
(function(window) {
var cartAbandon = pathfora.Message({
layout: "inline",
id: "inline-content-mod-widget-cart-abandon",
className: "inline-content-mod-widget",
position: "#demo-inline",
variant: 2,
image: "assets/basket.png",
headline: "Get your order with <span>free shipping</span>",
msg: "Looks like you were interested in purchasing a product on our site recently. We'd like to offer you free shipping on your current order. You're welcome!",
okMessage: "Apply Discount"
});
var highMomentum = pathfora.Message({
layout: "inline",
id: "inline-content-mod-widget-high-momentum",
className: "inline-content-mod-widget",
position: "#demo-inline",
variant: 2,
image: "assets/basket.png",
headline: "Get new coupons <span>every month</span>",
msg: "Want to get monthly coupons for up to 30% off your order every month? Sign up below to subscribe to our coupon mailing list.",
okMessage: "Sign Up"
});
var firstVisit = pathfora.Message({
layout: "inline",
id: "inline-content-mod-widget-first-visit",
className: "inline-content-mod-widget",
position: "#demo-inline",
variant: 2,
image: "assets/iphone.png",
headline: "Thanks <span>for visiting</span>",
msg: "Check out our new products. We provide the highest quality in everything from the newest smart phones to your favorite brand of shoes.",
okMessage: "Shop Now"
});
var modules = {
target: [{
segment: "high_momentum",
widgets: [highMomentum]
},
{
segment: "first_time_visitor",
widgets: [firstVisit]
},
{
segment: "cart_abandon",
widgets: [cartAbandon]
}]
}
window.pathfora.initializeWidgets(modules);
}(window));