Hey everyone, I'm setting up Matomo with GrowthBo...
# ask-questions
q
Hey everyone, I'm setting up Matomo with GrowthBook. I've successfully integrated the frontend, and tracking is working fine with Matomo. I also followed this guide to set up anonymous tracking. Now, I'm trying to create a fact table and metrics. Since auto-generated SQL queries are not available for Matomo, I attempted to create custom SQL queries, but I keep getting a 100% result in the ratio. I only need one metric: "Engaged Users." I also checked the GA4 structure (which works fine) to understand what should go into the fact table and what should be used in proportion, but I still get 100% results every time. For example, if 100 users visit the website and 15 users click a button (which fires an event), the metric should show 15/100, but it's not working as expected. Has anyone successfully set up Matomo with GrowthBook? Any guidance would be greatly appreciated! Thanks!
s
Hey @quaint-diamond-21082. What I'm not seeing in the screenshots you provided is the actual metric for Engaged Users. I see the fact table but then the metric would be created on that. It could be there, but I didn't see it in the screenshots.
q
@strong-mouse-55694 metric for Engaged Users is there let me give you more screenshot and sqls: SQL for fact table:
Copy code
SELECT
  conv(hex(events.idvisitor), 16, 16) AS anonymous_id,
  events.server_time AS timestamp,
  experiment.name AS experiment_id,
  pageview.name AS pageview_id,
  visit.config_device_model AS device,
  visit.config_os AS OS,
  visit.location_country AS country
FROM matomo_log_link_visit_action events
LEFT JOIN matomo_log_action experiment
  ON events.idaction_event_action = experiment.idaction 
  AND experiment.`type` = 11  -- Experiment event
LEFT JOIN matomo_log_action pageview
  ON events.idaction_url = pageview.idaction 
  AND pageview.`type` = 1  -- Pageview event
INNER JOIN matomo_log_visit visit
 ON events.idvisit = visit.idvisit
GrowthBook-Fact-Tables-EW-Matomo-Events-03-20-2025_09_40_AM.png,mat_res.png,mat2.png
GrowthBook-Experiments-extensions-button-03-20-2025_09_43_AM.png
h
How do you know a user is
Engaged
based on that table? the metric currently is just going to count as a 1 so long as the user has a row in that sql table.
q
@helpful-application-7107 I just wanted to understand how many users out of XXX actually participated in the experiment. and as i read the docs i need to create a main table which contains all data (fact table) and i need to create Metrics: Proportion Metrics Proportion Metrics measure the percent of users in an experiment who exist in a Fact Table (and match any filters you specify). So as you can check my fact-table & Metrics contains total 794 entries (as it's without any filter consider that all 794 user comes to website so those are engaged users). but in experiment result it shows only 5 users? where it should't be be 794 instead of 5? so i would get something like 10% user engaged with variation and 12% engaged with baseline? as currently i am getting 100% always where with GA4 it's fine it's with another project.