Closed (fixed)
Project:
Plausible
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2021 at 09:19 UTC
Updated:
3 Jul 2023 at 19:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cedeweyThis is a great idea. I've added some detail to the proposed resolution.
Comment #3
dieterholvoet commentedBefore anyone starts working on this, I have a basic implementation ready in a custom project we could use as a base.
Comment #4
srdtwc commented@DieterHolvoet that would be great to see. I am hoping to have this done in the next couple of weeks if you are able to share what you have.
Comment #5
dieterholvoet commentedHere's the custom controller I have in my project: https://gist.github.com/DieterHolvoet/1804206bde05a3a2bed93925a5fc2071
The part reading Gin settings is for matching the embed theme with the Gin theme light/dark mode. Instead of providing the ability to paste the whole embed HTML, I would add a field for the auth code and build the embed yourself as in my example. The result will look better.
Comment #6
srdtwc commentedThanks for sharing! That's exactly the approach I was going to take, but I didn't think of using the light/dark settings from Gin. That's a nice touch.
I'll let you know if I have any questions
Comment #7
dieterholvoet commentedIt might be a good idea to develop this with #3361729: Add a block with an embed of the Plausible dashboard in mind, e.g. by abstracting away the embed building in a custom element that we can use in both use cases.
Comment #9
srdtwc commentedI've opened a merge request with this feature in place.
I've kept it pretty simple for now to make sure the basic functionality works.
Comment #10
dieterholvoet commentedLooks good! Didn't test it yet, but added some comments in the MR. Setting to Needs work.
Comment #11
srdtwc commentedHere is where I got the "system" setting
Comment #12
srdtwc commentedI chose to have the full "Shared link" instead of just the auth param because I thought that would be more user friendly. Plausible provides the full Shared Link, so someone can just copy/paste that into the module settings, rather than having to copy just the auth param component. That could be difficult for a non-technical user who doesn't know what that is.
We have many clients who are switching from Google Analytics to Plausible for its user friendliness so that's something I'd like to keep in mind.
Comment #13
dieterholvoet commentedYou're right, the
systemvalue is correct. Must have got that wrong earlier and never noticed it. You're right about it being more user friendly to copy/paste the whole Shared url, I didn't think about that before.Comment #14
srdtwc commentedI have made the changes that you've requested as far as I've understood them. Sorry If there's anything I've missed.
The time I have been spending on this has come from a client project budget which is limited, so I don't think I am able to spend more time making feature enhancements. If you find any bugs in my code though I would be happy to address those.
Comment #15
dieterholvoet commented@srdtwc could you give this a last round of testing before I merge it?
Comment #16
srdtwc commentedI just tested these changes out and everything appears to be working fine. I tried removing and adding a shared link, adding an invalid link, viewing the shared link route when no link was set and all behaviors are as expected.
Thank you for your assistance with this.
Comment #17
srdtwc commentedComment #19
dieterholvoet commentedComment #20
dieterholvoet commentedThank you for the effort!