×
HIDE

Google Analytics Event Tracking

In this documentation, We will use google analytics universal gtag. So make sure you are using gtag.js to your site.

You can follow this tutorial to add custom js code to your site https://webdesign.tutsplus.com/tutorials/how-to-add-custom-javascript-to-your-wordpress-site–cms-34368

Option 1: Track per form basis

Add the following code to your site. You have to change YOUR-FORM-ID by your Form Id and you can change the event_category or event_label value based on your needs.

<script>
    jQuery(document).ready(function($) {
        $(document).on('click','#pafe-form-builder-trigger-success-YOUR-FORM-ID',function(){
            gtag('event', 'PAFE Form Builder Submission', {
                'event_category': 'PAFE Form Builder',
                'event_label': 'Form Submitted',
                'form_id': 'YOUR-FORM-ID'
            });
        });
    });
</script>

Option 2: Track Events For All Forms

Add the following code to your site. You can change the event_category or event_label value based on your needs.

<script>
    jQuery(document).ready(function($) {
        $(document).on('click','[data-pafe-form-builder-trigger-success]',function(){
            gtag('event', 'PAFE Form Builder Submission', {
                'event_category': 'PAFE Form Builder',
                'event_label': 'Form Submitted',
            });
        });
    });
</script>

Form Builder

Extensions

Widgets

Popup Trigger URL
Piotnet Addons For Elementor