Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Analytics and Facebook Pixel support #4573

Merged
merged 29 commits into from Aug 23, 2017

Conversation

kuzmany
Copy link
Member

@kuzmany kuzmany commented Aug 3, 2017

Q A
Bug fix?
New feature? y
Related user documentation PR URL mautic/documentation#224
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

This PR brings:

Tracking should use for remarketing in Facebook Ads and Google Adwords.

image

image

Steps to test this PR:

Facebook Pixel

  1. Create Facebook pixel https://www.facebook.com/business/help/952192354843755
  2. Go to Configurations and add Facebook Pixel ID end enable feature on landing/tracking page.
  3. Install Facebook Pixel Helper https://chrome.google.com/webstore/detail/facebook-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc
  4. Go to tracking page and check Facebook Pixel Helper - 1 event should fire in debug window
  5. Create campaign with page visit decision and add new action - Send tracking event
  6. Add yourself to campaign, go to tracking page and check Facebook Pixel Helper - 2 events should fired in debug window (see image below)

image

Google Analytics

  1. Go to Configurations and add Google Analytics ID end enable feature on landing/tracking page
  2. Install Tag assistent and enable recording on your website https://chrome.google.com/webstore/detail/tag-assistant-by-google/kejbdjndbnbjgmefkgdddjlbokphdefk
  3. Go to tracking page and Tag assistent - 1 pageview request should fire in debug window
  4. Create campaign with page visit decision and add action - Send tracking event
  5. Add yourself to campaign, go to tracking page and check Tag assistent - 1 pageview request and 1 events should fire in debug window (see image below)

image

@escopecz escopecz added feature A new feature for inclusion in minor or major releases WIP PR's that are not ready for review and are currently in progress labels Aug 3, 2017
@kuzmany
Copy link
Member Author

kuzmany commented Aug 4, 2017

@escopecz Ready for tests

@kuzmany kuzmany changed the title WIP: Facebook Pixel integration Facebook Pixel integration Aug 4, 2017
@escopecz escopecz added ready-to-test PR's that are ready to test and removed WIP PR's that are not ready for review and are currently in progress labels Aug 4, 2017
@luizeof
Copy link
Member

luizeof commented Aug 6, 2017

+1

\o/ Mautic Will Work like an tag manager, but campaign based !!!

GREAT Work @kuzmany

@luizeof
Copy link
Member

luizeof commented Aug 6, 2017

Can you show an image of campaign action for fb pixel? Thanks

@kuzmany kuzmany changed the title Facebook Pixel integration WIP: 3rd party pixel integration + campaign events Aug 8, 2017
@kuzmany
Copy link
Member Author

kuzmany commented Aug 8, 2017

@escopecz please mark this PR as WIP
I decided it rework with GA events, Facebook Pixel and Google Adwords support and possible extend via plugins with another tracking services

@kuzmany kuzmany changed the title WIP: 3rd party pixel integration + campaign events WIP: 3rd party pixels integration (fb, adwords, analytics) + campaign events Aug 8, 2017
@alanhartless alanhartless added the WIP PR's that are not ready for review and are currently in progress label Aug 9, 2017
*
* @var string
*/
* The mautic.page_on_hit event is thrown when a public page is browsed and a hit recorded in the analytics table.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thing but please fix these comment indentions.

const PAGE_ON_HIT = 'mautic.page_on_hit';

/**
* The mautic.track_on_hit event is thrown when a public page is browsed and a 3rd party tracking pixel is available
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thing but please fix these comment indentions.

@kuzmany kuzmany changed the title WIP: Google Analytics and Facebook Pixel support Google Analytics and Facebook Pixel support Aug 11, 2017
@kuzmany
Copy link
Member Author

kuzmany commented Aug 11, 2017

@escopecz ready for tests ;)

@escopecz escopecz removed the WIP PR's that are not ready for review and are currently in progress label Aug 18, 2017
@escopecz escopecz self-assigned this Aug 18, 2017
@matishaladiwala matishaladiwala modified the milestone: 2.10.0 Aug 18, 2017
@alanhartless alanhartless self-assigned this Aug 18, 2017
@escopecz escopecz added the needs-documentation PR's that need documentation before they can be merged label Aug 21, 2017
@escopecz
Copy link
Sponsor Member

If I insert the Facebook Pixel ID to the Mautic configuration and save it, it's blank again after refresh. None of the switches for the Facebook Pixel keeps the value after save either. Google Analytics as well.

@escopecz escopecz added the pending-feedback PR's and issues that are awaiting feedback from the author label Aug 21, 2017
@kuzmany
Copy link
Member Author

kuzmany commented Aug 21, 2017

@escopecz try now

@escopecz escopecz removed the pending-feedback PR's and issues that are awaiting feedback from the author label Aug 22, 2017
alanhartless
alanhartless previously approved these changes Aug 23, 2017
@alanhartless alanhartless dismissed their stale review August 23, 2017 08:10

Need to further test

@escopecz
Copy link
Sponsor Member

I tested FB pixel and it works nicely, but isn't there the category missing in the campaign action? This is how is the campaign tracking event configured:
screen shot 2017-08-23 at 13 48 42
And this is what was sent to FB:
screen shot 2017-08-23 at 13 48 25
I can see action, label, but not category.

@kuzmany
Copy link
Member Author

kuzmany commented Aug 23, 2017

@escopecz
Facebook pixel doesn't have category. Just action and label, category has tooltip with info.
I didn't want create two different actions but we can divided it.
Your FB pixel looks OK.

Facebook: action and label
GA: category, action and label

@escopecz
Copy link
Sponsor Member

Thanks for explanation. The tooltip translation is broken:
edit campaign mautic

@kuzmany
Copy link
Member Author

kuzmany commented Aug 23, 2017

@escopecz updated.
The reason is we could add in future to tracking campaign action another services like onesignal, adwords etc. Most of them has action and label, or category, action and label.

Copy link
Sponsor Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described for me 👍

This is amazing feature. Thanks!

Please write the docs for this asap so it can be included in 2.10.0.

@escopecz escopecz added the pending-test-confirmation PR's that require one test before they can be merged label Aug 23, 2017
@escopecz escopecz merged commit ba37572 into mautic:staging Aug 23, 2017
@escopecz escopecz removed the needs-documentation PR's that need documentation before they can be merged label Sep 6, 2017
@kuzmany kuzmany deleted the fbpixel-integration branch April 7, 2018 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature for inclusion in minor or major releases pending-test-confirmation PR's that require one test before they can be merged ready-to-test PR's that are ready to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants