The Google Analytics module comes with default settings for Drupal paths to exclude.

Unfortunately, one of these default paths is node/*/* and that matches the Drupal path of CitCon campaign thank-you pages.

The end result of all this is that Google Analytics does not track the form submission/thank you pages and you do not have complete stats.

My solution to this was to configure Google Analytics to specifically exclude only some node/*/* citcon paths. We should include this information and workaround in the documentation (when we write better docs).

To track thank you pages:

  • Visit admin/config/system/googleanalytics
  • Select the Pages vertical tab.
  • Verify that All pages with Exceptions is the selected mode (otherwise don't proceed, you need to add "node/*/thank-you" instead of the rest of these instructions)
  • Find the line node/*/* and replace it with the following:
    node/*/edit
    node/*/results
    node/*/translate
    node/*/import-supporters
    node/*/devel
    node/*/delete
    
  • Save the settings for Google Analytics
  • Sign a campaign and then View the HTML source of the thank you page and verify the analytics code is in there. Obviously the thank-you pages will also start appearing on the Google Analytics side.

Comments

mgifford’s picture

How hard would it be to replace the node/*/thank-you with a petition_node_path/thank-you

Surely the latter is where we want to go.