Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Gravity Forms Elements Trigger Configuration (Follow-on Question)

  • I previously submitted a question under the following topic which I think I closed too quickly:

    https://generate.support/topic/gravity-forms-elements-trigger-configuration/

    Revisiting that question, prior to GeneratePress, we used the following code block in Google Tag Manager which listened for Gravity Forms submissions:

    <script type="text/javascript">
      jQuery(document).ready(function() {
       jQuery(document).on("gform_confirmation_loaded", function(event, formID) {
        window.dataLayer = window.dataLayer || [];
        window.dataLayer.push({
         'event': 'formSubmission',
         'formID': formID
        });
       });
      });
    </script>

    Given its script structure, this didn’t work with GeneratePress, so we decided to load it using a hook element.

    Keep in mind that this block of code was part of the Google Tag Manager hook that we load as an element in the header.

    We’ve separated it from the Tag Manager code, but Ying said this block should be loaded in the footer. Is this right? If it would have been loaded in the head with the GTM code, isn’t it logical that it should be loaded in the head by itself? Or am I missing something about code placement?

    Thank you,
    Ted

  • Given its script structure, this didn’t work with GeneratePress,

    I don’t see why it’s not working with GP. Do you have instructions from the code provider?

    We usually add JS to wp_footer so it won’t block the initial page view and affect your performance. But if it’s instructed to be added in the header area, then you can use wp_head hook instead.

  • The code provider isn’t familiar with generatepress, and doesn’t appear to be motivated to help me work through this challenge. I have wp_footer set and we’ll see if we can get it working.

  • The code provider isn’t familiar with generatepress

    I don’t think he needs to be familiar with GP, if it’s not working, let me know what is the general direction of WP sites.

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