Skip to content

Commit ca08c1f

Browse files
committed
Add cloudflare and link to contact on other guides
1 parent b076194 commit ca08c1f

17 files changed

+94
-41
lines changed

_docs/20_script/analytics.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ Example code:
3131

3232
```js
3333
/* src/analytics.js */
34-
import Analytics from 'analytics'
35-
import simpleAnalyticsPlugin from 'analytics-plugin-simple-analytics'
34+
import Analytics from "analytics";
35+
import simpleAnalyticsPlugin from "analytics-plugin-simple-analytics";
3636

3737
const analytics = Analytics({
38-
app: 'awesome-app',
38+
app: "awesome-app",
3939
plugins: [
4040
// Load simple analytics! 🎉
41-
simpleAnalyticsPlugin(),
41+
simpleAnalyticsPlugin()
4242
]
43-
})
43+
});
4444

4545
/* All page views are now tracked by simple analytics */
4646
```
@@ -64,3 +64,5 @@ Include this line at the end of your `<body>`
6464
## View the source
6565

6666
You can view the source code of this plugin on [GitHub](https://github.com/DavidWells/analytics/tree/master/packages/analytics-plugin-simple-analytics)
67+
68+
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).

_docs/20_script/cloudflare.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Install Simple Analytics on Cloudflare
3+
menu: Install on Cloudflare
4+
category: script
5+
category_order: 2
6+
order: 6
7+
hidden: true
8+
permalink: /install-simple-analytics-on-cloudflare
9+
---
10+
11+
You can embed our script in Cloudflare using [Cloudflare Apps](https://www.cloudflare.com/apps/simpleanalytics). On this page we will explain how to use this feature and help you installing the Simple Analytics app on Cloudflare.
12+
13+
Follow these steps to add Simple Analytics to your website:
14+
15+
1. Go to the <a href="https://www.cloudflare.com/apps/simpleanalytics" target="_blank">Simple Analytics app on Cloudflare</a>
16+
1. Make sure you are logged in
17+
1. Click on **Preview on your site**:
18+
19+
![](/images/cloudflare-01.jpg)
20+
21+
1. You can customize some settings like [recording DNT users](/dnt), a [custom domain](/bypass-ad-blockers), [track events](/events), or enabling [hash navigation](/hash-mode). Once you're done click the button **Finish installing onto your site**:
22+
23+
![](/images/cloudflare-02.jpg)
24+
25+
1. Next click on the domain where you want to add Simple Analytics on:
26+
27+
![](/images/cloudflare-03.jpg)
28+
29+
1. Next click on **Install on all pages**:
30+
31+
![](/images/cloudflare-04.jpg)
32+
33+
1. Next click on **Continue** (we don't use your email):
34+
35+
![](/images/cloudflare-05.jpg)
36+
37+
1. On the next page you will see the Simple Analytics app installed:
38+
39+
![](/images/cloudflare-06.jpg)
40+
41+
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).

_docs/20_script/custom.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,31 @@ We make this work by overwriting the native `pushState`-function of the browser.
2121
```js
2222
// We check if the browser supports pushState
2323
if (history.pushState && Event && dispatchEvent) {
24-
2524
// We create a listener based on the original browser feature
2625
var stateListener = function(type) {
27-
var orig = history[type]
26+
var orig = history[type];
2827
return function() {
29-
var rv = orig.apply(this, arguments)
30-
var event = new Event(type)
31-
event.arguments = arguments
32-
dispatchEvent(event)
33-
return rv
34-
}
35-
}
28+
var rv = orig.apply(this, arguments);
29+
var event = new Event(type);
30+
event.arguments = arguments;
31+
dispatchEvent(event);
32+
return rv;
33+
};
34+
};
3635

3736
// We connect our own created a listener to the pushState feature
38-
history.pushState = stateListener('pushState')
37+
history.pushState = stateListener("pushState");
3938

4039
// Now we can listen for pushState events and keep the original feature of the browser working
41-
window.addEventListener('pushState', function() {
40+
window.addEventListener("pushState", function() {
4241
// Here we trigger the page view
43-
})
42+
});
4443
}
4544
```
4645

4746
You can read our source code [on GitHub](https://github.com/simpleanalytics/scripts/blob/4ad5c1b6cb4c42ae2e483dc43a578e25399d53a4/src/default.js#L120-L137).
4847

4948
</div>
5049
</details>
50+
51+
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).

_docs/20_script/dnt.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ To also record DNT visitors you can add `data-skip-dnt="true"` to the script tag
2121
```
2222

2323
If you don't add the `data-skip-dnt` attribute we will not record visits from users where DNT is enabled.
24+
25+
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).

_docs/20_script/ghost.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ Follow these steps to add Simple Analytics to your website:
1515
1. Go to your Ghost Admin settings
1616
1. Next click on **Code Injection** in the sidebar menu:
1717

18-
![](/images/ghost-click-code-injection.jpg)
18+
![](/images/ghost-click-code-injection.jpg)
1919

2020
1. Paste the embed code from [how to add our script](/script) into the **Site Footer** text input field:
2121

22-
![](/images/ghost-add-code.jpg)
22+
![](/images/ghost-add-code.jpg)
2323

2424
1. Click on **Save** and you are done:
2525

26-
![](/images/ghost-save-code.jpg)
26+
![](/images/ghost-save-code.jpg)
2727

28+
Read more on implementing Simple Analytics in the [Ghost docs](https://ghost.org/integrations/simple-analytics/).
2829

29-
<!-- Read more on implementing Simple Analytics in the [Ghost docs](https://docs.ghost.org/integrations/simpleanalytics/). -->
30+
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).

_docs/20_script/hash.md

+2
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ To allow the script to detect those hash changes you can add `data-mode="hash"`
1818
```
1919

2020
This way the Simple Analytics script knows it should detect hash changes and records them as page views. We still drop everything after the question mark, but we keep the hash.
21+
22+
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).

_docs/20_script/script.md

+2
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ We have a website setup wizard to test if you installed your script correctly. I
2525
> Read about [_Single Page Apps_ (SPA's)](/trigger-custom-page-views) like React, Vue, and Angular and [hash navigation](/hash-mode).
2626
2727
When you are done [go to your dashboard](https://simpleanalytics.com/websites?ref={{ site.hostname }}).
28+
29+
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).

_docs/20_script/squarespace.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,24 @@ Follow these steps to add Simple Analytics to your website:
1818
1. Click on the website you want to edit.
1919
1. Click on **Settings** in the sidebar menu:
2020

21-
![](/images/squarespace-click-on-settings.jpg)
21+
![](/images/squarespace-click-on-settings.jpg)
2222

2323
1. Next click on **Advanced** in the same sidebar menu:
2424

25-
![](/images/squarespace-click-on-advanced.jpg)
25+
![](/images/squarespace-click-on-advanced.jpg)
2626

2727
1. Next click on **Code Injection** in the same sidebar menu:
2828

29-
![](/images/squarespace-click-on-code-injection.jpg)
29+
![](/images/squarespace-click-on-code-injection.jpg)
3030

3131
1. Paste the embed code from [how to add our script](/script) into the **footer** text input field:
3232

33-
![](/images/squarespace-paste-embed-code.jpg)
33+
![](/images/squarespace-paste-embed-code.jpg)
3434

3535
1. Click on **save** and you are done:
3636

37-
![](/images/squarespace-save-embed-code.jpg)
38-
37+
![](/images/squarespace-save-embed-code.jpg)
3938

4039
Read more on using Code Injection in the [Squarespace docs](https://support.squarespace.com/hc/en-us/articles/205815908-Using-Code-Injection).
40+
41+
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).

_docs/20_script/webflow.md

+2
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ Follow these steps to add Simple Analytics to your website:
2626
1. Click on **Save Changes** and you are done
2727

2828
> Custom scripts will only appear on the published site.
29+
30+
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).

_docs/20_script/wix.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ Follow these steps to add Simple Analytics to your website:
1717
1. Go to [Settings in your site's dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Manage%20Settings&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/manage-website).
1818
1. Click the **Tracking & Analytics** menu item under **Settings**.
1919

20-
![](/images/wix-select-analytics.jpg)
20+
![](/images/wix-select-analytics.jpg)
2121

2222
1. Click **+ New Tool** and select **Custom** from the dropdown.
2323

24-
![](/images/wix-select-custom.jpg)
24+
![](/images/wix-select-custom.jpg)
2525

2626
1. Enter your custom code you can copy from [how to add our script](/script).
2727
1. Select the relevant domain. _Note: This option will appear only if you have multiple domains._
@@ -31,3 +31,5 @@ Follow these steps to add Simple Analytics to your website:
3131
1. Click **Apply**.
3232

3333
Read more on the [WIX docs](https://support.wix.com/en/article/embedding-custom-code-to-your-site).
34+
35+
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).

_docs/20_script/wordpress.md

+9-12
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ There are two ways to add our WordPress plugin to your site. Via the your WordPr
1717
1. Go to your WordPress admin (likely on /wp-admin or [wordpress.com/log-in](https://wordpress.com/log-in))
1818
1. Go to plugins in your WordPress admin and click on **Add new**:
1919

20-
![](/images/wordpress-click-add-new-plugin.jpg)
20+
![](/images/wordpress-click-add-new-plugin.jpg)
2121

22-
1. Click on Search Plugins and type `simpleanalytics` *(do not use a space)*
22+
1. Click on Search Plugins and type `simpleanalytics` _(do not use a space)_
2323
1. Click on **Install Now**
2424
1. After this click on **Activate** and our plugin is installed
2525

@@ -31,33 +31,30 @@ Follow these steps to add Simple Analytics to your WordPress website:
3131
1. Go to your WordPress admin (likely on /wp-admin or [wordpress.com/log-in](https://wordpress.com/log-in))
3232
1. Next click on **Plugins** > **Add New** in the sidebar menu:
3333

34-
![](/images/wordpress-click-add-new-plugin.jpg)
34+
![](/images/wordpress-click-add-new-plugin.jpg)
3535

3636
1. Click on the **Upload Plugin** button:
3737

38-
![](/images/wordpress-click-upload-plugin.jpg)
38+
![](/images/wordpress-click-upload-plugin.jpg)
3939

4040
1. Click on **Browse** to select a file _(this button can have different text depending on your browser)_:
4141

42-
![](/images/wordpress-click-browse.jpg)
42+
![](/images/wordpress-click-browse.jpg)
4343

4444
1. Browse and select the file that you downloaded in the first step:
4545

46-
![](/images/wordpress-select-file.jpg)
46+
![](/images/wordpress-select-file.jpg)
4747

4848
1. Click on the button **Install Now**:
4949

50-
![](/images/wordpress-click-install-now.jpg)
50+
![](/images/wordpress-click-install-now.jpg)
5151

5252
1. Click on **Activate Plugin**:
5353

54-
![](/images/wordpress-click-activate-plugin.jpg)
54+
![](/images/wordpress-click-activate-plugin.jpg)
5555

5656
1. If the Simple Analytics plugin is successfully installed it shows a screen like this:
5757

58-
![](/images/wordpress-installed-plugins.jpg)
58+
![](/images/wordpress-installed-plugins.jpg)
5959

6060
If you encounter issues, don't hesitate to contact us via [our support channels](https://simpleanalytics.com/contact?ref={{ site.hostname }}).
61-
62-
63-
<!-- Read more on implementing Simple Analytics in the [Ghost docs](https://docs.ghost.org/integrations/simpleanalytics/). -->

images/cloudflare-01.jpg

80.7 KB
Loading

images/cloudflare-02.jpg

290 KB
Loading

images/cloudflare-03.jpg

110 KB
Loading

images/cloudflare-04.jpg

167 KB
Loading

images/cloudflare-05.jpg

141 KB
Loading

images/cloudflare-06.jpg

102 KB
Loading

0 commit comments

Comments
 (0)