Skip to content

Instantly share code, notes, and snippets.

@ityulkanov
Created February 20, 2017 08:37
Show Gist options
  • Save ityulkanov/f8239b112c5de8c3fd90b4dbf10c0f0d to your computer and use it in GitHub Desktop.
Save ityulkanov/f8239b112c5de8c3fd90b4dbf10c0f0d to your computer and use it in GitHub Desktop.
<script>
(function(w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({
'marketcall.start': new Date().getTime(),
event: 'mccb.js'
});
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'mcLayer' ? '&l=' + l : '';
j.async = true;
j.src = 'https://www.marketcall.ru/js/mccb.js?program_id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'mcLayer', '19654');
// отправляем постбек после клика на кнопку
Marketcall.Widgets.Callback.on('submitted.mc.form', function() {
// получаем параметр vcode из урла
var vcode = window.location.search.replace('?vcode=', '');
// подставляем параметр в готовый постбек и отправляем его
$.get("http://instant-news.ru/postback/common.php?vcode=" + vcode + "&amount=500&status=new&sec=buv2myud", function(data) {});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment