문제

Stock adding google coversion tracking code after ajax successful. I can't put the code just as is in a div and set the display to none and then change the css display value because the code will be tracked from google so i have to inject it after ajax call.

도움이 되었습니까?

해결책

Answer was originally from Ollo, this adds 1x1 iframe inside a div after submission. What i did was to create

<div id="converter"></div>

and then add this simple jQuery

$("#converter").html("<iframe height='1' width='1' name='converter' src='tracking.html'></iframe>");

after ajax successful. Then create tracking.html which contains the Google conversion code.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top