Provides Google Analytics integration, Google site verification, and a Google+ sharing button for use with SilverWare.
Installation is via Composer:
$ composer require silverware/google
As with all SilverStripe modules, configuration is via YAML. Extensions are applied to Page
and
ContentController
for Google integration. An extension is also applied to site configuration which
adds a tab for Google settings to the SilverWare Services tab.
By default, the Google API will automatically detect the appropriate language to use for buttons and widgets based on the user locale. However, if you would like to force the API to use a particular language, you can do so using site configuration. Go to Settings > SilverWare > Services > Google > Google API, and select the desired language from the dropdown field.
Provided is a GoogleSharingButton
which is used with the SharingComponent
from the SilverWare Social Module. Simply add this button as a child of
SharingComponent
using the site tree, and your pages will now
be able to be shared via Google+.
For more information, see the Google documentation.
This module provides automatic integration with Google Analytics to measure page views and statistics within your SilverWare app. To do this, you will first need to create a Google Analytics tracking ID.
After you have a tracking ID, simply paste the ID into the Google Analytics section of site configuration, and check the "Enabled" box:
After saving the settings, you can verify tracking is working by using the Real-Time feature in your Google Analytics account.
Some Google features (such as Search Console) require verification of site ownership. Google performs this check by looking for a verification code within the source of the website.
After adding your site as a property to Search Console, Google will ask that you verify ownership. You should see two tabs, "Recommended method" and "Alternate methods":
- Click the "Alternate methods" tab.
- Click on "HTML tag" from the methods that appear.
- Copy the meta tag code that appears, and paste it into the "Verification code" field in site configuration.
- Save the site configuration.
It does not matter if you paste the entire meta tag HTML, as it will be detected and only the verification code will remain after saving.
Please use the GitHub issue tracker for bug reports and feature requests.
Your contributions are gladly welcomed to help make this project better. Please see contributing for more information.
Colin Tucker | Praxis Interactive |
BSD-3-Clause © Praxis Interactive