отслеживание пикселя или JavaScript включает?

Я пошел с измененной версией ответа Скотта Фроста. Проблема с его примером заключается в том, что .replace заменяет только первый экземпляр символа в строке. Вот модифицированная версия, которая будет использовать регулярное выражение / g (global) для изменения всех вхождений символа во всей строке.

$('.jqtooltip').tooltip({ 
   content: function (callback) {
      callback($(this).prop('title').replace(new RegExp("\\|", "g"), '<br />'));
   }
});
8
задан Macros 15 June 2009 в 16:14
поделиться

4 ответа

If you include an external script in the section, it is downloaded and executed before the page is shown, so you are sure that if a user saw the page they got tracked. For tags there is no such guarantee, as the user might navigate away before the browser launches the load request for that image.

So, if you want to optimize for trackability, use a