Update for on submit event
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 13 Apr 2018 20:55:22 +0000 (16:55 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 13 Apr 2018 20:55:22 +0000 (16:55 -0400)
Update the code and test on dev55

parts/tracking-pixels.php

index 072860c..6b3140e 100644 (file)
     Creation Date: 04/11/2018
     -->
     <script type="text/javascript">
-    function FLOOD2(){
-        var axel = Math.random() + "";
-        var a = axel * 10000000000000;
-        document.write('<iframe src="https://8447986.fls.doubleclick.net/activityi;src=8447986;type=truen0;cat=conta00;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>');
-    }
 
+       function FLOOD1(type, cat, u1) {
+               var axel = Math.random()+"";
+               var a = axel * 10000000000000000;
+               var flDiv=document.body.appendChild(document.createElement("div"));
+               flDiv.setAttribute("id","DCLK_FLDiv1");
+               flDiv.style.position="absolute";
+               flDiv.style.top="0";
+               flDiv.style.left="0";
+               flDiv.style.width="1px";
+               flDiv.style.height="1px";
+               flDiv.style.display="none";
+               flDiv.innerHTML='<iframe src="https://8447986.fls.doubleclick.net/activityi;src=8447986;type=truen0;cat=conta00;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"><\/iframe>';
+       }
     jQuery(document).ready(function($) {
         $('#gform_1').submit(function(){
-            console.log( 'flood lights on');
-            return false;
-            FLOOD2();
+            FLOOD1();
+            return;
         });
     });
     </script>