Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.vscode Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
assets Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
config Updated js-application-analytics sample to 1.3.0 Sep 29, 2017
sharepoint/assets Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
src/extensions/analytics Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
typings Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
.editorconfig Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
.gitattributes Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
.gitignore Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
.npmignore Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
.yo-rc.json Updated js-application-analytics sample to 1.3.0 Sep 29, 2017
README.md Updated js-application-analytics sample to 1.3.0 Sep 29, 2017
gulpfile.js Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
package-lock.json Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017
package.json Updated js-application-analytics sample to 1.3.0 Sep 29, 2017
tsconfig.json Add 'samples/js-application-analytics/' from commit '45b21def559cdbe9… Jun 9, 2017

README.md

Google Analytics Application Customizer

Summary

In this sample is possible to see how to implement Google Analytics through SPFx Extensions Application Customizers

Google Analytics Application Customizer

Used SharePoint Framework Version

1.3.0

Applies to

Solution

Solution Author(s)
js-application-analytics Giuliano De Luca (@giuleon , www.delucagiuliano.com)

Version history

Version Date Comments
1.0 June 09, 2017 Initial release
1.1 September 29, 2017 Updated for SPFx GA 1.3.0

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • Clone this repository
  • Update the pageUrl properties in the config/serve.json file
    • The pageUrl should be a modern page
    • This property is only used during development in conjunction with the gulp serve command
  • in the command line run:
    • npm install

Features

This sample illustrates how to levereage the SharePoint Framework Extensions Applciation Customizer to analyze the usage through Google Analytics of a SharePoint site:

  • Application Customizer
  • Google Analytics

Don't forget to insert your Google Analytics tracking code something like that 'UA-100713841-5'

Debug URL for testing

Here's a debug URL for testing around this sample.

?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js&customActions={"e8613642-17ee-4392-a8fd-5c0d6edcdb19":{"location":"ClientSideExtension.ApplicationCustomizer","properties":{"testMessage":"Hello as property!"}}}