Created
January 9, 2019 18:12
-
-
Save dvygolov/fec765bbc695a07c0e46c90de30fc28c to your computer and use it in GitHub Desktop.
Код для А/Б тестирования объявлений и лендингов в CPA в Facebook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Вот поля, которые надо добавить ВНУТРИ тега form: | |
<input type="hidden" name="sub1" value=""> | |
<input type="hidden" name="sub2" value="ID_ВАШЕГО_ЛЕНДА"> | |
И скрипт, который надо добавить ПОСЛЕ закрывающегося тега </form>: | |
<script> | |
const urlParams = new URLSearchParams(window.location.search); | |
if(urlParams.has('utm_content')){ | |
var utmContent=urlParams.get('utm_content'); | |
document.getElementsByName('sub1')[0].value=utmContent; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment