fb-instant-articles icon indicating copy to clipboard operation
fb-instant-articles copied to clipboard

Receiving wrong source/medium on Google Analytics

Open abazeed opened this issue 4 years ago • 4 comments

Steps required to reproduce the problem

  1. Apply the following setup:
  • Article Style: not the default one
  • Facebook Page ID
  • Copyright
  • Right-to-Left Publishing
  • Ad Type: Facebook Audience Network
  • Ad Dimensions: Large
  • Analytics: Embed code
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-X"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments)};
  gtag('js', new Date());
  gtag('set', 'page_title', 'FBIA: ' + ia_document.title);
  gtag('set', 'campaignSource', 'Facebook');
  gtag('set', 'campaignMedium', 'Instant Article');
  gtag('set', { referrer: ia_document.referrer });
  gtag('config', 'UA-XXXXXXXX-X');
</script>
  • Enable custom transformer rules
{"rules": [
    {"class": "IgnoreRule", "selector": "meta"},
    {"class": "PassThroughRule", "selector": "div.jeg_meta_author"}
]}
  1. All the settings which are not listed above are not active/checked

Expected Result

Receiving hits from my Instant Articles on GA with the following UTM values:

  • Campaign Source: Facebook
  • Campaign Medium: Instant Article

Actual Result

I'm receiving hits from my Instant Articles in GA, but the source/medium is:

  • Campaign Source: (direct)
  • Campaign Medium: (none)

The page title is received properly.

Version Info

  • Plugin version: 4.2.0
  • WordPress version: 5.4 Multisite
  • PHP version: 7.2.26

abazeed avatar Jun 03 '20 12:06 abazeed

@abazeed did you solve the problem? I have the same problem with a Multisite (subdirectories). Site A has Source Facebook and Medium Social when I click on Site B of the same Multisite the Source become direct and medium none

Zigmundadu avatar Nov 09 '20 22:11 Zigmundadu

I am facing the same issue, I have implemented this set up in instant article in September. Data seems good in October and November but since January my direct traffic increasing like a hell and instant article traffic went down.

I am sure that Facebook is not reading campaign source medium and sending those numbers in direct channel. Still finding the solutions but no SUCCESS. Please help is anyone can share the solution on it.

thank you

pratikhjoshi avatar Mar 16 '21 07:03 pratikhjoshi

This issue has been marked stale because it has been open for 30 days with no activity. If there is no activity within 7 days, it will be closed.

This is an automation to keep issues manageable and actionable and is not a comment on the quality of this issue nor on the work done so far. Closed issues are still valuable to the project and are available to be searched.

github-actions[bot] avatar Sep 25 '22 00:09 github-actions[bot]

@abazeed did you solve the problem? I have the same problem with a Multisite (subdirectories). Site A has Source Facebook and Medium Social when I click on Site B of the same Multisite the Source become direct and medium none

@Zigmundadu, @pratikhjoshi, I stopped using the official IA plugin of Facebook because it's no more maintained! I'm currently using this plugin WP Native Articles which is recommended by Kinsta.

Another good option that supports Google AMP and PWA besides Facebook IA is Instantify. You can buy it from here for 4.99$.

abazeed avatar Sep 26 '22 04:09 abazeed

This issue has been marked stale because it has been open for 7 days with no activity. If there is no activity within 7 days, it will be closed.

This is an automation to keep issues manageable and actionable and is not a comment on the quality of this issue nor on the work done so far. Closed issues are still valuable to the project and are available to be searched.

github-actions[bot] avatar Oct 16 '22 02:10 github-actions[bot]