This page shows to to set up reCAPTCHA and Google analytics for a new NC site.
reCAPTCHA is a tool to stop bots making accounts on the NC websites. More info: https://www.google.com/recaptcha/about/
This isn't the only anti-spam protection the Nature Counts sites have. The following Drupal modules are also installed:
And here is some information on the Indicia documentation about how to prevent spam submissions: https://indicia-docs.readthedocs.io/en/latest/administrating/drupal/preventing-spam.html
The reCAPTCHA module (https://www.drupal.org/project/recaptcha) makes boxes like this on the new user sign-up forms:
Essentially in order to se this up two things are needed to be done:
Register a new site on reCAPTCHA
Update the drupal reCAPTCHA module with the newly registered reCAPTCHA site
Go to https://www.google.com/recaptcha/admin and make sure you're logged in with the data4nature@wildsheffield.com Google account as this is where the other sites are registered on reCAPTCHA.
Check that you're logged in as Data 4 Nature when you go to the reCAPTCHA admin console
Click the + create button
Fill in the options like so:
Label: this is just what the site is labelled when you look at it in the reCAPTCHA admin console, doesn't really matter what this is but for consistence generally go for 'Nature Counts [Area of Trust] WT'
reCAPTCHA type: the v2 'I'm not a robot' tickbox is a suitable compromise between security and user friendliness
Domains: This is where you put the domain of the Nature Counts website
Send alerts to owners: this is optional but might as well leave ticked in case anything does arise
Then press submit
You will be then taken to this page which has two keys (which are greyed out in this screenshot). Don't close this webpage unless you have copied the keys somewhere else or have set them up in Nature Counts (see next step below):
You will need to copy these keys into the captcha configuration settings in Drupal.
Log in as admin then go to
../admin/config/people/captcha/recaptcha
And you will be met with this webpage:
You will find there will already be some keys in here from the NC site that the site is cloned from.
Copy the keys from the google reCAPTCHA page into the site ke and secret key input boxes.
Then click save.
Once you've copied the keys into the Drupal configuration and saved, you can now to go the create new account page at .. /user/register and you should see that the tickbox is working correctly. It's worth making a test Drupal account just to make sure it all works.
Then go back to the reCAPTCHA admin console and make sure you've got the right site seletected then click on settings:
Then you'll see a security preference. Move it all the way to the 'Most secure' option. Then click save.
Then you're done.
See also Google analytics
Google analytics set-up is useful for tracking how many people are visiting the site. For example, tracking engagement through an event.
It is set up in a similar way to the Google reCAPTCHA
Create tracking IDs in the google analytics admin area
Add those tracking IDs to the Drupal configuration
Google analytics is set up in Drupal using https://www.drupal.org/project/google_analytics
Log in to Google analytics with the data4nature@wildsheffield.com account: https://analytics.google.com/analytics/web
The top left hand button gives you the options to switch between the analytics for the different websites.
The admin button in the bottom left of the page is where you can change the settings for a property or create a new property.
Click the Admin button to bring up this page:
Click on add property to create a new site as below.
Make sure you click 'Show advanced options' and select the option to create a Universal Analytics property, and the option to create a Universal Analytics property only.
Fill in the property name (just something that means you'll know that it is) and the website URL (this has to be the correct url or the analytics won't work)
When you click next it asks for some business information but it doesn't really matter what you put there.
This will then take you to this page:
The important thing on this page is the Measurement ID. You'll need this in the next step.
This tracking ID should begin with G-.
Log into the Nature Counts site as an admin and go to ../admin/config/system/google-analytics
You will find this page:
Simply copy the Measurement ID from the Google analytics page into the Web Property ID box and click on 'Save configuration'
There are also various other options here but you can leave them as is.
Each partner trust might want to see how many visitors they are getting. However to do this they will need to be given access to the page.
Find out the email of someone at a partner trust that want's access to this.
They can quickly link to the analytics pages from Google analytics where the direct inks for each property should be listed. If you have created a new property you should also copy a link onto that google site page.
Log in to Google analytics with the data4nature@wildsheffield.com account: https://analytics.google.com/analytics/web
Click on the admin button for a particular property
Click on Property Access Management
Click on the blue + button in the top right and click on Add users
Add their email address then click on 'Add' in the top right hand corner.
They will receive an email like so:
They can now look at the google analytics data for their Nature Counts site. Nice one.