AFL UTM Tracker Documentation

  1. Home
  2. Docs
  3. AFL UTM Tracker Documentation
  4. Contact Form 7 Integration
  5. Exporting UTM conversion attribution in Contact Form 7 with Flamingo

Exporting UTM conversion attribution in Contact Form 7 with Flamingo

You can export the UTM report in Contact Form 7 with Flamingo by adding the following custom code to your theme’s functions.php file.

Custom code is required because Flamingo does not have a hook in their Flamingo_Inbound_CSV PHP class. However Flamingo provides developers the capability to fully override their Flamingo_Inbound_CSV PHP class by calling your own PHP class.

Why have we not included this code as part of our AFL UTM Tracker plugin?

It is because the Flamingo plugin only allows one custom file to override the existing Flamingo_Inbound_CSV PHP class. This means if we include this file as part of our plugin, a different plugin will not be able to add custom column into the CSV file.

Minimum Requirements:

  • AFL UTM Tracker v2.9.0
  • Contact Form 7 v5.7.1
  • Flamingo v2.4.0

Steps

You will need basic PHP knowledge for this tutorial.

  1. Open your theme’s functions.php in a file editor.
  2. Copy the code below and paste into the functions.php file. Ignore the Line 1 below if your functions.php already has the PHP open tag.
  3. Test the code in your staging site first before making changes to production.
  4. To test the code, go to your WordPress dashboard.
  5. Go to Flamingo > Inbound Messages.
  6. Click on the Export button.
  7. Finally check the downloaded CSV file to see if the UTM report is included.

Code