0

I am trying to keep track of users clicking on a button within my marketing automation software, Infusionsoft. Infusionsoft gives me a snippet which I would like to add to my 'Click Here' button shown below. However, I would like to remove the form itself as it is not necessary to show. When a user clicks on the button, the javascript snippet would still run in the background. I realize this might be a round-about-way of solving this problem, so I'm welcoming all suggestions for improvements.

Is there anyway I can hide this form while still utilizing this snippet code when a user click on 'Click Here'?

From what I've researched, it seems like:

1) I would have to implement some third party solution, such as Flash or Flex (prefer not to do this)

2) I've tried utilizing a <p hidden> tag, but that didn't seem to work

3) Add a separate JS file and reference that JS file in my HTML (but not exactly sure how this would make it work)

Below is a screenshot of what my site looks like: Form Screenshot

Would like to remove the form above

Below is my code:

<p><a target="_blank" title="Click to download all 7 I Love It ads" onclick="window.open('<?php echo $urlStringILI; ?>','popup','width=450,height=350,left='+(screen.availWidth/2-200)+',top='+(screen.availHeight/2-125)+'');return false;" href="<?php echo $urlStringILI; ?>" ><strong>Click Here</strong></a> To  Download The &ldquo;I Love It Because I Chose It&rdquo; Ads
    <script type='text/javascript' src='https://fb976.infusionsoft.com/app/form/iframe/db670b7e512a36318bcc43f5592377ec'></script>
</p>
a2b123
  • 573
  • 1
  • 5
  • 19
  • the form is automatically generated by infusionsoft through the javascript snippet. Where in my CSS could I edit this if its automatically generated? – a2b123 Jul 05 '18 at 16:37
  • It's really unclear what you want. Are you just trying to POST the user data (which is already on the page somehow) when the button is clicked? – Derek Brown Jul 05 '18 at 16:38
  • apologies. no I am not trying to post the data. I am just trying to have the javscript snippet fire when the user click on the "Click Here" button, but I don't want to show the form that is automatically generated by infusionsoft. See the – a2b123 Jul 05 '18 at 16:39
  • 1
    It is being generated into the `iFrame` you cannot trigger the `submit` button by your `click here` link due to XXS. – Rohit.007 Jul 05 '18 at 16:41
  • I really am not trying to utilize the submit button. I would like to hide that as well but I do understand that the javascript snippet will fire only when that button is pressed. Was hoping to see if there was any time of workaround for this @Rohit.007 – a2b123 Jul 05 '18 at 16:45
  • With infusionsoft, instead of using the javascript snippet, you can use their form HTML code, right? – git-e-up Jul 05 '18 at 16:48

0 Answers0