Open DevCEDTeam opened 1 year ago
How to install Mautic Pixel Tracking, Mautic Webhook Transcript, and UTM Transcript manually using CLI commands and sample code references:
Please note that these instructions assume you have access to a command-line interface (CLI) and are comfortable running commands and editing files.
To install Mautic Pixel Tracking, follow these steps:
Access your server using SSH or any preferred method to open a command-line interface.
Navigate to the root directory of your Mautic installation using the cd
command. For example:
cd /var/www/mautic/
Once inside the Mautic root directory, run the following command to create a new pixel:
php bin/console mautic:pixel:create
Follow the prompts to provide a name for your pixel and select the events you want to track. For example, if you want to track page visits and form submissions, select the appropriate options.
After completing the prompts, Mautic will generate a pixel code snippet for you. Copy this snippet.
Open the HTML source code of the pages where you want to track user interactions. Place the pixel code snippet before the closing </head>
tag.
Save the changes to your website's HTML source code.
To install Mautic Webhook Transcript, follow these steps:
Access your server using SSH or any preferred method to open a command-line interface.
Navigate to the root directory of your Mautic installation using the cd
command. For example:
cd /var/www/mautic/
Once inside the Mautic root directory, run the following command to create a new webhook:
php bin/console mautic:webhooks:create
Provide a name and description for your webhook when prompted.
Enter the URL of the endpoint where you want Mautic to send the webhook data.
Choose the events that should trigger the webhook by selecting the appropriate options.
Configure any additional options or parameters required by your webhook endpoint.
Save the webhook settings.
To install Mautic UTM Transcript, follow these steps:
Access your server using SSH or any preferred method to open a command-line interface.
Navigate to the root directory of your Mautic installation using the cd
command. For example:
cd /var/www/mautic/
Once inside the Mautic root directory, run the following command to create a new tracking URL:
php bin/console mautic:tracking:utm:create
Enter the destination URL that you want to track using UTM parameters.
Add any UTM parameters you want to include, such as source, medium, and campaign.
Configure any additional options or parameters required for your tracking URL.
Save the tracking URL.
Please note that the above commands assume you are in the root directory of your Mautic installation. Modify the commands accordingly if your installation is located in a different directory.
Remember to customize the settings and configurations based on your specific requirements. The provided CLI commands will assist you in creating the necessary components for Mautic Pixel Tracking, Webhook Transcript, and UTM Transcript within your Mautic installation.
Email Tracking Events
Proxy Server
Step-by-step guide on how to enable the Cloud Functions API, set up the local development environment, write the entire index.js file, deploy the Cloud Function to Google Cloud, set up Mautic Form event tracking, set up email open pixel tracking, set up a Google Analytics Dashboard, and test the tracking with sample codes. This guide includes the use of a proxy server to track data from email leads to Google Tag Manager. Please note that there may be cases where Google restricts certain scripts from loading, which could affect the appearance or behavior of the embedded form. In such cases, you can try using the manual copy method for the form JavaScript code provided by Mautic, instead of relying on the automatic copy.
Step 1: Enable the Cloud Functions API
Step 2: Set up the local development environment
Step 3: Write the entire index.js file in the project directory
index.js
in your project directory and add the following code:package.json
Note: Replace the placeholders
ACTID
,EVENTKEY
,APIURL
, andAPIKEY
with your actual values.Step 4: Deploy the Cloud Function to Google Cloud
YOUR_PROJECT_ID
with your actual project ID:Step 5: Set up Mautic Form event tracking
Step 6: Set up email open pixel tracking
Note: Replace
<your-cloud-function-url>
with the URL of your Cloud Function.Step 7: Set up Google Analytics Dashboard
Step 8: Test the tracking with sample codes
You can test the tracking using the following sample codes and UTM query strings:
Sample code for Mautic form event:
Sample code for email open pixel:
Note: Replace
<your-cloud-function-url>
with the URL of your Cloud Function.That's it! You have now set up Mautic Form event tracking, email open pixel tracking, and a Google Analytics Dashboard using Google Cloud Functions with a proxy server. You can further customize and expand the tracking functionality as needed.