Title: Additional Settings
Last modified: August 21, 2016

---

# Additional Settings

 *  [richgcook](https://wordpress.org/support/users/richgcook/)
 * (@richgcook)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/additional-settings/)
 * Hi folks,
 * I’m adding some Google tracking when the form is successfully sent and have this
   set up as:
 * `on_sent_ok: "_gaq.push(['_trackEvent', 'Contact Form', PAGE TITLE, 'Sent',, 
   false]);"`
 * This all works, of course, but I’m wanting to insert the title of the page the
   form you are viewing is on (as the form is on every page…) so I can then see 
   which pages get most contact forms sent.
 * I tried adding some PHP to this: `<?php the_title(); ?>` which didn’t work and
   then tried setting up a variable and adding this in:
 *     ```
       var flexPageTitle = $('.header-page-title').text();
       on_sent_ok: "_gaq.push(['_trackEvent', 'Contact Form', flexPageTitle, 'Sent',, false]);"
       ```
   
 * But it states that flexPageTitle is undefined…
 * Any help or ideas? Thanks.
    R
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

The topic ‘Additional Settings’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [additional settings](https://wordpress.org/support/topic-tag/additional-settings/)

 * 0 replies
 * 1 participant
 * Last reply from: [richgcook](https://wordpress.org/support/users/richgcook/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/additional-settings/)
 * Status: not resolved