forked from adswerve/google_analytics_flattener
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 866cce2
Showing
28 changed files
with
1,519 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
.gcloudignore | ||
.DS_Store | ||
.vscode | ||
|
||
# Python pycache: | ||
__pycache__/ | ||
.pytest_cache | ||
|
||
pycache/ | ||
.pycache | ||
|
||
#Python virtual environment | ||
venv/ | ||
env/ | ||
local/ | ||
|
||
#python compiled files | ||
*.pyc | ||
|
||
#sandbox files | ||
sandbox/ | ||
|
||
#Google App Engine Standard | ||
lib/ | ||
|
||
#windows generated files | ||
Thumbs.db | ||
|
||
#Binary files | ||
*.obj | ||
*.exe | ||
*.pdb | ||
*.user | ||
*.aps | ||
*.pch | ||
*.vspscc | ||
*_i.c | ||
*_p.c | ||
*.ncb | ||
*.suo | ||
*.tlb | ||
*.tlh | ||
*.bak | ||
*.cache | ||
*.ilk | ||
*.log | ||
*.dll | ||
*.lib | ||
*.sbr | ||
*.un~ | ||
*.gz | ||
|
||
#Pycharm | ||
|
||
*.ndb | ||
.idea | ||
# node | ||
node_modules/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
- BSD 3-Clause license - | ||
|
||
Copyright (c) Adswerve, Inc. All rights reserved. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, this | ||
list of conditions and the following disclaimer in the documentation and/or | ||
other materials provided with the distribution. | ||
|
||
* Neither the name of Adswerve nor the names of its contributors may be | ||
used to endorse or promote products derived from this software without | ||
specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# README # | ||
|
||
Temporary repo for Open Source GA Flattener tool. | ||
Directories: | ||
* cf : cloud function files | ||
* tools : utilities to help with testing and backfilling data | ||
* tests : units test | ||
|
||
# PREREQUISITES # | ||
1. Add "Logs Configuration Writer", "Cloud Functions Developer" pre | ||
defined IAM roles to | ||
[PROJECT_NUMBER]@cloudservices.gserviceaccount.com (built in service | ||
account) otherwise deployment will fail with permission errors. See | ||
<https://cloud.google.com/deployment-manager/docs/access-control> for | ||
detailed explanation. | ||
2. Install gCloud | ||
3. Clone github open source repo | ||
4. Create Google GCP project | ||
5. Enable the Cloud Build API | ||
6. Enable the Cloud Functions API | ||
7. Create bucket for staging code during deployment (apmk-staging, | ||
as-dev-gord-staging, aka: <project_name>-staging. TODO: automatic | ||
this | ||
|
||
# Commands # | ||
* gcloud config set project analyticspros.com:spotted-cinnamon-834 | ||
* gcloud config set account [email protected] | ||
* gcloud deployment-manager deployments create deployment-ga-flattene | ||
--config ga_flattener.yaml | ||
* gcloud deployment-manager deployments delete | ||
deployment-ga-flattener -q | ||
|
||
# Notes # | ||
* name of deployment in gcloud command is accessed with {{ | ||
env["deployment"] }} in JINJA templates | ||
* main.py cannot have numerous blank lines at the end. | ||
|
||
# TODO # | ||
* apply labels to all resources (where possible) to help with cost | ||
measuring | ||
* develop default flattening queries | ||
* develop initial configuration for datasets | ||
* develop initial confiugraiton for custom dimensions |
Oops, something went wrong.