Closed tofumatt closed 8 months ago
IB ✅
@benbowler
Q-2) As per Reports we are showing Total revenue in widgets which is the sum of Purchase revenue + Subscription Revenue + Ad revenue. Is this correct as we need to show only Ad Revenue.
Hey @mohitwp, thanks for your QA. I've created a new PR and put this back to CR to confirm the approach. Both widgets for me now show the same revenue values for each page.
To your second point, it is not possible to filter by adSourceName in the GA4 dashboard and there is no page data in the AdSense reporting, therefore the report URL we are using in the widget is the best link we can get.
@mohitwp Back to you for another pass.
@benbowler The 'Top earning pages' KM widget and Dashboard widgets are displaying the same data for the first page in the list on the Main Dashboard. However, when we visit the related report it shows different earnings.This discrepancy only occurs with the first page in the list; other pages display consistent earnings numbers on both the main dashboard and in the Analytics report.
Hey @mohitwp this is expected, unfortunately there is not a report in GA4 that we can link to that shows just the AdSense revenue (It's actually not possible in the GA4 interface to filter by the Ad Source Name as we can do in the API).
@benbowler Just wondering why this is happening only in case of first page in the list ?As you can see in screenshots shared above Rest of the pages are showing same earning on main dashboard widgets and under GA4 report.
Hey @mohitwp, as I mentioned in Slack yesterday, by looking at some revenue reports in the GA dashboard I can confirm the only revenue source on oi.ie is the sites AdSense account.
I took another look at the widgets code an found that the pageTitle
dimension, when removed, gives the correct full revenue amount for all pages. My hypothesis is the page title changed during the last 28 days meaning this dimension split the revenue shown in the widgets.
I've now created a follow up PR to bring the report numbers back into check, to match the report in GA.
@mohitwp Back to you for another pass, hopefully all works this time. :pray:
Feature Description
Currently, the Top Earning Content Key Metric Tile (#6248) and the Top Earning Pages widget with GA4 data (#8059) do not filter out non-AdSense revenue. As discussed with @marrrmarrr in Slack (https://10up.slack.com/archives/CFFRMC5DE/p1708363912766809?thread_ts=1708361122.867059&cid=CFFRMC5DE), both these components' reports should filter out any data that does not include revenue sourced from AdSense.
The report data can be filtered by AdSense
accountID
to ensure only AdSense data is shown in Site Kit.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidgetGA4.js
andassets/js/modules/adsense/components/widgets/TopEarningContentWidget.js
:adsenseAccountID
using thegetAccountID
selector of AdSense module.adSourceName
to the list of dimensions.dimensionFilter
with the following Object to filter results by theadsenseAccountID
includes/Modules/AdSense/Settings.php
:Setting_With_ViewOnly_Keys_Interface
to theSetting
class to exposeaccountID
in view-only context.Test Coverage
QA Brief
ga4AdSenseIntegration
feature flagadSenseLinked
setting in the store (this will allow you to QA this ticket before #8049 is merged). You can achieve this by running the following the developer console:adSenseLinked
setting is true (this can be simulated in view only mode as above).When the
ga4AdSenseIntegration
feature flag is disabled, this KMW tile should not appear.Changelog entry