Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #497730

    Hi!

    I have 5 different pages that need 5 different tracking codes when the submit button is pressed. How can I insert them separretly for each page?

    Thanks!

    #497826

    Hi EuroInfoSys!

    Your doing this? http://kriesi.at/documentation/enfold/add-onclick-event-to-the-contact-form-submit-button/

    You can target separate pages like so.

    add_filter('avf_contact_form_submit_button_attr','avia_add_submit_attributes_to_cf', 10, 3);
    function avia_add_submit_attributes_to_cf($att, $formID, $form_params){
      if ( is_page( 12 ) ) { $att = "onclick=\"_gaq.push(['_trackPageview', '/VP/XXX/XXX']);\""; }
      if ( is_page( 13 ) ) { $att = "onclick=\"_gaq.push(['_trackPageview', '/VP/XXX/XXX']);\""; }
      return $att;
    }

    And change “12, 13” to the IDs of your pages.

    Cheers!
    Elliott

    #1355030

    Good morning, I have the need to trace a contact form and I have seen the reference documentation and this post.

    Seeing the date that the thread has, I would like to confirm that the solution is still the same.

    In my case I need to apply it in a multisite configured so that the sites are located in directories.

    Another question that generates me is to know what part of the tracking code I have to enter in its function. Just the ID or is it necessary to include the entire Script?

    THANK YOU !

    #1355057

    Hi Marcos Q.,

    I think that code should work in the Google Analytics Tracking Code field, did you try to add it there?

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.