Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function getCookie(name) {
- var matches = document.cookie.match(new RegExp(
- "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
- ))
- return matches ? decodeURIComponent(matches[1]) : undefined
- }
- var roistat = getCookie('roistat_visit');
- var roistatMarker = getCookie('roistat_marker');
- if (!roistatMarker) {
- roistatMarker = 'прямой заход';
- }
- jq_144(function($) {
- if (window.location.search) {
- var paramsStr =
- decodeURIComponent(window.location.search.substring(1).replace(/\+/g, ' '));
- var params = paramsStr.split('&');
- var urlData = {};
- for (var i = 0; i < params.length; i++) {
- urlData[params[i].split('=')[0]] = params[i].split('=')[1];
- }
- }
- $(document).ready(function() {
- if (urlData && urlData.lead_id) {
- $('body').append( '<img src="http://cloud.roistat.com/site-api/0.2/integration/lpgenerator?secret=qwyhdg762ds' +
- '&projectId=' + '1111' +
- '&name=' + urlData.name +
- '&email=' + urlData.mail +
- '&phone=' + urlData.phone +
- '&title=' + 'Новая сделка' +
- '&text=' + 'Текст комментария' +
- '&Источник=' + roistatMarker +
- '&roistat=' + roistat +
- '&lead_id=' + urlData.lead_id +
- '" width="0" height="0" />' );
- }
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement