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

Idea: Unique tracking codes per Fathom instance #50

Closed
austinginder opened this issue Jun 6, 2018 · 16 comments
Closed

Idea: Unique tracking codes per Fathom instance #50

austinginder opened this issue Jun 6, 2018 · 16 comments

Comments

@austinginder
Copy link

This was briefly talked about in #36 however I'd like to add some of my thoughts. Tracking multiple websites per Fathom instance would be great. Due to the complexities to site configuring (subdomains, subfolder sites, etc) I propose including an optional unique code which can be added to the tracking code.

This could function similar to Google's UA code and would allow for a clear way to parse through the data when viewing reports (per unique code). This would require some spam considering. Maybe each unique code could be assigned to a particular domain. Or even simpler, just give a way to parse the domain(s) you want when viewing the reports per each unique code. Like only show me unique code (XX-12345) from my site https://anchor.host and ignore the rest (like spammers who ninja tracking codes).

Possible use cases for unique codes include:

  • Multiple websites
  • Separate initiates on the same website
@austinginder austinginder changed the title Idea: Manage multiple tracking codes per Fathom instance Idea: Unique tracking codes per Fathom instance Jun 6, 2018
@hchouhan
Copy link

hchouhan commented Jun 6, 2018

+1 for that.

@dannyvankooten
Copy link
Contributor

Hey @austinginder,

I'm actually in favor of this idea by now too, especially for small sites and since it'll be relatively easy to put a site in its own instance later on if it proves necessary (eg for performance reasons).

This won't make it in v1 (due in a few days) but I'm hoping to do the work on this in a few weeks.

@rosswintle
Copy link

I confess, my biggest surprise when I got Fathom v1.0 up and running was that it only seemed to track one site. My attempt at my own analytics just uses the referrer from the page hit to match a site that's registered in the database. I'd not considered that you could get spam from people faking the referrer. I'll have to find a way to mitigate that.

@iskrisis
Copy link

I manage around 20 very small low traffic websites and for that usecase Fathom would be amazing. I run Matomo (piwik) now and its bloated + it needs mysql (which i keep on server just for that). Go + sqlite seems to be so great choice in this case.

Keeping my fingers crossed

@deanpcmad
Copy link

I manage a couple of small sites so would also like this

@dannyvankooten
Copy link
Contributor

dannyvankooten commented Sep 18, 2018

Now that our hosted Fathom offering is out of the door, this is pretty much our top priority. So rest assured that this'll land in Fathom very soon.

@cweagans
Copy link

cweagans commented Oct 9, 2018

Super excited to give this a spin :)

@m1guelpf
Copy link
Contributor

m1guelpf commented Oct 9, 2018

@dannyvankooten How should we upgrade?

@austinginder
Copy link
Author

@m1guelpf You'll have to compile from the latest source code or wait for an official release.

@dannyvankooten Gave it a try. I was able to add new sites however it looks like the only one gathering data is the primary site. Is that because the stats are computed daily? Or maybe something is broken. Here's what my database scheme looks like. The daily tables only have records with site_id equal to 1. I do see some data relating to other sites starting to fill up the pageviews table.

MariaDB [fathom]> show tables;
+----------------------+
| Tables_in_fathom     |
+----------------------+
| daily_page_stats     |
| daily_referrer_stats |
| daily_site_stats     |
| migrations           |
| pageviews            |
| sites                |
| users                |
+----------------------+
7 rows in set (0.00 sec)

MariaDB [fathom]> select * from migrations;
+------------------------------------------------------+---------------------+
| id                                                   | applied_at          |
+------------------------------------------------------+---------------------+
| 1_initial_tables.sql                                 | 2018-05-10 19:37:07 |
| 2_known_durations_column.sql                         | 2018-05-30 20:31:27 |
| 3_referrer_group_column.sql                          | 2018-06-05 01:35:54 |
| 4_pageview_id_column.sql                             | 2018-07-20 16:57:03 |
| 5_create_sites_table.sql                             | 2018-10-09 16:11:38 |
| 6_add_site_tracking_id_column_to_pageviews_table.sql | 2018-10-09 16:11:38 |
| 7_add_site_id_to_site_stats_table.sql                | 2018-10-09 16:11:38 |
| 8_add_site_id_to_page_stats_table.sql                | 2018-10-09 16:11:38 |
| 9_add_site_id_to_referrer_stats_table.sql            | 2018-10-09 16:11:39 |
+------------------------------------------------------+---------------------+
9 rows in set (0.00 sec)

@dannyvankooten
Copy link
Contributor

Hey @austinginder,

Good catch! We weren't quite there yet with regards to the actual stats aggregation for multiple istes, but the latest master commit should do it. Things should be pretty stable from here on as we make final preparations for an official v1.1 release!

@austinginder
Copy link
Author

Looks like it's working!

@cweagans
Copy link

Sorry to badger, but when do you anticipate tagging a new release?

@dannyvankooten
Copy link
Contributor

Monday!

@cweagans
Copy link

I've been playing with this a bit, and I'm not seeing how to actually use it. Is there a UI for switching between the different sites in the dashboard?

@sdenike
Copy link

sdenike commented Jan 9, 2019

I've been playing with this a bit, and I'm not seeing how to actually use it. Is there a UI for switching between the different sites in the dashboard?

Same here, I assume that I am missing something?

@dannyvankooten
Copy link
Contributor

@sdenike @cweagans Sorry for the late reply, but the UI to manage your sites is only visible if your dashboard is not public.

To make a public dashboard private, run the following command to register your user account.

fathom user add --email=your@email.com --password=secret

After you're done adding your sites, you can safely delete the user again like so:

fathom user delete --email=you@email.com

JackEllis added a commit that referenced this issue Feb 3, 2019
Addressing issues raised in #50 and #215
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants