0

I'm using JSF 2 and Primefaces 5 and I want to track a google adwords conversion after commandButton completed successfully AND without "thank you" page. I can't use ajax because I'm performing a lot of backing bean validation.

I read many threads dealing with google adwords like this one, so this part is not a problem. But how can I execute the javascript after commandButton? Thanks

Community
  • 1
  • 1
codyLine
  • 509
  • 2
  • 8
  • 26
  • Are you using some rerender, or some other component to say to the user that his request was successful? If so, try to use a script tag on the rerendered object, it must run the code when the new block is rendered. If you are using some component, try to find and use the event it triggers when displayed (something like "onShow")... Please add some code or git link so we can do more for you... – Maxinne Mar 12 '15 at 14:45
  • Oh, I'm so blind, I haven't thought about using a conditional renderer like mentioned in the "duplicate" answer. I think that will work. – codyLine Mar 12 '15 at 15:17

0 Answers0