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
Contributor

@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

kuzmany added 3 commits Aug 3, 2017
@kuzmany
Copy link
Contributor Author

@kuzmany 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 and removed WIP labels Aug 4, 2017
@luizeof
Copy link

@luizeof luizeof commented Aug 6, 2017

+1

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

GREAT Work @kuzmany

@luizeof
Copy link

@luizeof 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
Contributor Author

@kuzmany 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 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.

This comment has been minimized.

@alanhartless

alanhartless Aug 9, 2017
Contributor

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

This comment has been minimized.

@alanhartless

alanhartless Aug 9, 2017
Contributor

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 added 2 commits Aug 11, 2017
@kuzmany
Copy link
Contributor Author

@kuzmany kuzmany commented Aug 11, 2017

@escopecz ready for tests ;)

@escopecz escopecz removed the WIP 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
Copy link
Member

@escopecz escopecz commented Aug 21, 2017

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.

@kuzmany
Copy link
Contributor Author

@kuzmany kuzmany commented Aug 21, 2017

@escopecz try now

@alanhartless alanhartless dismissed their stale review Aug 23, 2017

Need to further test

@escopecz
Copy link
Member

@escopecz escopecz commented Aug 23, 2017

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
Contributor Author

@kuzmany 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
Member

@escopecz escopecz commented Aug 23, 2017

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

@kuzmany
Copy link
Contributor Author

@kuzmany 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
Member

@escopecz escopecz left a comment

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 merged commit ba37572 into mautic:staging Aug 23, 2017
2 checks passed
2 checks passed
Scrutinizer No new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kuzmany kuzmany deleted the kuzmany:fbpixel-integration branch Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.