232 lines
8.0 KiB
Smarty
232 lines
8.0 KiB
Smarty
{if $event === 'PageView'}
|
|
<script>
|
|
(function (w, d, namespace, domain, progId, tagId, undefined) {
|
|
w[namespace] = w[namespace] || {}; var act = w[namespace], payload = []; act.tags = act.tags || []; act.tags.push(tagId, payload);
|
|
var protocol = d.location.protocol;
|
|
|
|
// Start editable part
|
|
payload.push({
|
|
module: 'Profiling',
|
|
event: 'PageView',
|
|
page_url: '{$base_dir|cat:$request_uri_without_slash}',
|
|
page_type: '{$page_type}',
|
|
page_name: '{$page_name}',
|
|
page_category: '{$page_category}',
|
|
referer_url: '{$reffer_url}'
|
|
});
|
|
|
|
// End editable part
|
|
|
|
if (act.get === undefined) {
|
|
var s = d.createElement('script');
|
|
s.type = 'text/javascript';
|
|
s.src = protocol + '//' + domain + '/' + 'affadvc.aspx?ns=' + namespace + '&dm=' + domain + '&site=' + progId + '&tag=' + tagId;
|
|
s.async = false;
|
|
(d.getElementsByTagName('body')[0] || d.getElementsByTagName('head')[0]).appendChild(s);
|
|
} else { act.get(w, d, progId, tagId); }
|
|
})(window, document,
|
|
// Start editable part
|
|
'aff_act_1.0', 'act.reussissonsensemble.fr', 15580, 'TAG-ID-1');
|
|
// End editable part
|
|
</script>
|
|
{elseif $event === 'CategoryView'}
|
|
<script>
|
|
(function (w, d, namespace, domain, progId, tagId, undefined) {
|
|
w[namespace] = w[namespace] || {}; var act = w[namespace], payload = []; act.tags = act.tags || []; act.tags.push(tagId, payload);
|
|
var protocol = d.location.protocol;
|
|
|
|
// Start editable part
|
|
payload.push({
|
|
module: 'Profiling',
|
|
event: 'CategoryView',
|
|
category_id: '{$id_category}',
|
|
category_name: '{$return_category_name}',
|
|
category_img_url: '',
|
|
category_click_url: '{$base_dir|cat:$request_uri_without_slash}',
|
|
referer_url: '{$reffer_url}'
|
|
});
|
|
|
|
// End editable part
|
|
|
|
if (act.get === undefined) {
|
|
var s = d.createElement('script');
|
|
s.type = 'text/javascript';
|
|
s.src = protocol + '//' + domain + '/' + 'affadvc.aspx?ns=' + namespace + '&dm=' + domain + '&site=' + progId + '&tag=' + tagId;
|
|
s.async = false;
|
|
(d.getElementsByTagName('body')[0] || d.getElementsByTagName('head')[0]).appendChild(s);
|
|
} else { act.get(w, d, progId, tagId); }
|
|
})(window, document,
|
|
// Start editable part
|
|
'aff_act_1.0', 'act.reussissonsensemble.fr', 15580, 'TAG-ID-1');
|
|
// End editable part
|
|
</script>
|
|
{elseif $event === 'ProductView'}
|
|
<script>
|
|
(function (w, d, namespace, domain, progId, tagId, undefined) {
|
|
w[namespace] = w[namespace] || {}; var act = w[namespace], payload = []; act.tags = act.tags || []; act.tags.push(tagId, payload);
|
|
var protocol = d.location.protocol;
|
|
|
|
// Start editable part
|
|
payload.push({
|
|
module: 'Profiling',
|
|
event: 'ProductView',
|
|
currency: 'EUR',
|
|
product_name: '{$product->name}',
|
|
product_id: '{$product->id}',
|
|
product_price: {$productPrice},
|
|
product_old_price: {$productPriceWithoutReduction},
|
|
product_category: [{foreach from=$categories_name item=cat_name}'{$cat_name}',{/foreach}],
|
|
product_brand: '{$product_manufacturer->name}',
|
|
product_rating: '0',
|
|
product_in_stock: '{if $product->getQuantity() > 0}true{else}false{/if}',
|
|
product_on_sale: '{if $product->on_sale == 1}true{else}false{/if}',
|
|
product_accessory: 'false',
|
|
product_img_url: '',
|
|
product_click_url: '{$base_dir|cat:$request_uri_without_slash}',
|
|
customer_gender: '{if $customer->id_gender == 0}Inconnu{elseif $customer->id_gender == 1}Homme{else}Femme{/if}',
|
|
customer_age_range: '{$age}',
|
|
customer_zip: '',
|
|
user_log: 'true',
|
|
referer_url: '{$reffer_url}'
|
|
|
|
});
|
|
|
|
// End editable part
|
|
|
|
if (act.get === undefined) {
|
|
var s = d.createElement('script');
|
|
s.type = 'text/javascript';
|
|
s.src = protocol + '//' + domain + '/' + 'affadvc.aspx?ns=' + namespace + '&dm=' + domain + '&site=' + progId + '&tag=' + tagId;
|
|
s.async = false;
|
|
(d.getElementsByTagName('body')[0] || d.getElementsByTagName('head')[0]).appendChild(s);
|
|
}else { act.get(w, d, progId, tagId); }
|
|
})(window, document,
|
|
// Start editable part
|
|
'aff_act_1.0', 'act.reussissonsensemble.fr', 15580, 'TAG-ID-1');
|
|
// End editable part
|
|
</script>
|
|
{elseif $event === 'CartView'}
|
|
<script>
|
|
(function (w, d, namespace, domain, progId, tagId, undefined) {
|
|
w[namespace] = w[namespace] || {}; var act = w[namespace], payload = []; act.tags = act.tags || []; act.tags.push(tagId, payload);
|
|
var protocol = d.location.protocol;
|
|
|
|
{assign var=total_quantity value=0}
|
|
{foreach from=$products item=product}
|
|
{assign var=total_quantity value=$total_quantity + $product.quantity}
|
|
{/foreach}
|
|
|
|
// Start editable part
|
|
payload.push({
|
|
module: 'Profiling',
|
|
event: 'CartView',
|
|
total_price: {$total_products_wt - $total_discounts},
|
|
total_quantity: {$total_quantity},
|
|
currency: 'EUR',
|
|
tax: 19,
|
|
products: [
|
|
{foreach from=$products item=product}
|
|
{
|
|
product_id: '{$product.id_product}',
|
|
product_name: '{$product.name}',
|
|
product_price: {$product.price},
|
|
product_quantity: {$product.quantity}
|
|
},
|
|
{/foreach}
|
|
],
|
|
voucher_code: '{foreach from=$discounts item=discount}{$discount.code}{/foreach}',
|
|
voucher_code_discount: {$total_discounts},
|
|
referer_url: '{$reffer_url}'
|
|
});
|
|
|
|
// End editable part
|
|
|
|
if (act.get === undefined) {
|
|
var s = d.createElement('script');
|
|
s.type = 'text/javascript';
|
|
s.src = protocol + '//' + domain + '/' + 'affadvc.aspx?ns=' + namespace + '&dm=' + domain + '&site=' + progId + '&tag=' + tagId;
|
|
s.async = false;
|
|
(d.getElementsByTagName('body')[0] || d.getElementsByTagName('head')[0]).appendChild(s);
|
|
}else { act.get(w, d, progId, tagId); }
|
|
})(window, document,
|
|
// Start editable part
|
|
'aff_act_1.0', 'act.reussissonsensemble.fr', 15580, 'TAG-ID-1');
|
|
// End editable part
|
|
</script>
|
|
{elseif $event === 'CustomerData'}
|
|
<script>
|
|
(function (w, d, namespace, domain, progId, tagId, undefined) {
|
|
w[namespace] = w[namespace] || {}; var act = w[namespace], payload
|
|
= []; act.tags = act.tags || []; act.tags.push(tagId, payload);
|
|
var protocol = d.location.protocol;
|
|
// Start editable part
|
|
payload.push({
|
|
module: 'Profiling',
|
|
event: 'CustomerData',
|
|
customer_firstname: '{$customer->firstname}',
|
|
customer_lastname: '{$customer->lastname}',
|
|
customer_email: '{$customer->email}',
|
|
customer_zip: '',
|
|
customer_city: '',
|
|
customer_country: '',
|
|
customer_age: {$customer->getAge()},
|
|
referer_url: '{$reffer_url}',
|
|
customer_age_range: '',
|
|
customer_status: '{$new}'
|
|
});
|
|
// End editable part
|
|
if (act.get === undefined) {
|
|
var s = d.createElement('script');
|
|
s.type = 'text/javascript';
|
|
s.src = protocol + '//' + domain + '/' + 'affadvc.aspx?ns=' +
|
|
namespace + '&dm=' + domain + '&site=' + progId + '&tag=' +
|
|
tagId;
|
|
s.async = true;
|
|
(d.getElementsByTagName('body')[0] ||
|
|
d.getElementsByTagName('head')[0]).appendChild(s);
|
|
}else { act.get(w, d, progId, tagId); }
|
|
})(window, document,
|
|
// Start editable part
|
|
'aff_act_1.0', 'act.reussissonsensemble.fr', 15580, 'TAG-ID-1');
|
|
// End editable part
|
|
</script>
|
|
{elseif $event === 'Lead'}
|
|
{if $customer->pro == 1}
|
|
{assign var='status' value='professionel'}
|
|
{else}
|
|
{assign var='status' value='particulier'}
|
|
{/if}
|
|
<script>
|
|
(function (w, d, namespace, domain, progId, tagId, undefined) {
|
|
w[namespace] = w[namespace] || {}; var act = w[namespace], payload = [];
|
|
act.tags = act.tags || []; act.tags.push(tagId, payload);
|
|
var protocol = d.location.protocol;
|
|
|
|
// Start editable part
|
|
payload.push({
|
|
module: 'OrderTracking',
|
|
event: 'Lead',
|
|
order_id: '{$customer->email}',
|
|
rate_number: 1,
|
|
program_subid1: '{$status}'
|
|
});
|
|
// End editable part
|
|
|
|
if (act.get === undefined) {
|
|
var s = d.createElement('script');
|
|
s.type = 'text/javascript';
|
|
s.src = protocol + '//' + domain + '/' + 'affadvc.aspx?ns=' + namespace +
|
|
'&dm=' + domain + '&site=' + progId + '&tag=' + tagId;
|
|
s.async = false; // always keep false for standard tracking
|
|
(d.getElementsByTagName('body')[0] || d.getElementsByTagName('head')[0]).appendChild(s);
|
|
} else { act.get(w, d, progId, tagId); }
|
|
})(window, document,
|
|
// Start editable part
|
|
'aff_act_1.0', 'act.reussissonsensemble.fr', 15580, 'conf inscription');
|
|
// End editable part
|
|
</script>
|
|
<noscript>
|
|
<img src="https://clic.reussissonsensemble.fr/TrackOrder.aspx?site=15580&event=lead&order_id={$customer->email}&rate_number=1&program_subid1={$status}" />
|
|
</noscript>
|
|
|
|
{/if} |