Skip to content

Commit

Permalink
chore: update umami url
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Aug 19, 2023
1 parent a430a67 commit b6be4fc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/web/build/inject-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const templatePath = path.resolve(__dirname, '../assets/template.html');
// frontjs
// const script = `<script type="text/javascript">(function (w) {w.frontjsConfig={token:"acd42b4b4e2b2a9fa33b36e9cd60e866",behaviour:15,captureConsoleLog:true,trustVendor:true,ignoreVendor:true,optimisedForSPA:true,useHistory:true,FPSThreshold:10};w.frontjsTmpData = {r:[],e:[],l:[]};w.frontjsTmpCollector = function (ev) {(ev.message ? window.frontjsTmpData.e : window.frontjsTmpData.r).push([new Date().getTime(), ev])};w.FrontJS = {addEventListener: function (t, f) {w.frontjsTmpData.l.push([t, f]);return f;},removeEventListener: function (t, f) {for (var i = 0; i < w.frontjsTmpData.l.length; i++) {t === w.frontjsTmpData.l[i][0] && f === w.frontjsTmpData.l[i][1] && w.frontjsTmpData.l.splice(i, 1);}return f;}};w.document.addEventListener("error", w.frontjsTmpCollector, true);w.addEventListener("error", w.frontjsTmpCollector, true);w.addEventListener("load", function () {var n = w.document.createElement("script");n.src = "https://frontjs-static.pgyer.com/dist/current/frontjs.web.min.js"; w.document.body.appendChild(n);}, true);})(window);</script>`;
// umami
const script = `<script async defer data-website-id="550cf175-3bd2-4292-b0a8-ccdf85f7b807" src="https://umami.moonrailgun.com/umami.js"></script>`;
const script = `<script async defer data-website-id="550cf175-3bd2-4292-b0a8-ccdf85f7b807" src="https://umami.moonrailgun.com/script.js"></script>`;

console.log('templatePath', templatePath);
let template = fs.readFileSync(templatePath, {
Expand Down
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ module.exports = {
],
scripts: [
{
src: 'https://umami.moonrailgun.com/umami.js',
src: 'https://umami.moonrailgun.com/script.js',
async: true,
defer: true,
'data-website-id': '22f7ff7b-db54-4222-b123-c8e3acfbf1aa',
Expand Down
10 changes: 6 additions & 4 deletions website/src/components/HomepageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export const HomepageHeader: React.FC = React.memo(() => {
Tailchat: {siteConfig.tagline}
<small>
<Link
className="umami--click--what-is-noim"
href="/blog/2023/03/01/the-era-of-noIM"
data-umami-event="what-is-noim"
>
<Translate>What is noIM(not only IM)?</Translate>
</Link>
Expand All @@ -61,22 +61,24 @@ export const HomepageHeader: React.FC = React.memo(() => {

<div className="btns">
<Link
className="button button--primary button--lg umami--click--joingroup"
className="button button--primary button--lg"
to={inviteLink}
data-umami-event="joingroup"
>
<Translate>Join our Group</Translate>
</Link>

<Link
className="button button--secondary button--lg umami--click--learnmore"
className="button button--secondary button--lg"
href="/docs/intro"
data-umami-event="learnmore"
>
<Translate>Learn More</Translate>
</Link>
</div>

<div className="link">
<Link className="umami--click--direct-nightly" to={nightlyUrl}>
<Link to={nightlyUrl} data-umami-event="direct-nightly">
<Translate>Or direct visit Tailchat nightly version</Translate>
</Link>
</div>
Expand Down
5 changes: 3 additions & 2 deletions website/src/components/JoinCommunity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export const JoinCommunity: React.FC = React.memo(() => {
</Translate>
</p>
<Link
className="button button--primary button--lg umami--click--joingroup"
className="button button--primary button--lg"
href={inviteLink}
data-umami-event="joingroup"
>
<Translate>Join Our Group</Translate>
</Link>
Expand All @@ -28,7 +29,7 @@ export const JoinCommunity: React.FC = React.memo(() => {
href="https://www.producthunt.com/posts/tailchat?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-tailchat"
target="_blank"
rel="noreferrer"
className="umami--click--producthunt"
data-umami-event="producthunt"
>
<img
src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=382080&theme=light"
Expand Down

0 comments on commit b6be4fc

Please sign in to comment.