-
Notifications
You must be signed in to change notification settings - Fork 0
Create pack members
Laika supports one or more pack members, or tenants, which can be used to represent different clients.
Browse to the /pack-members/ folder, then duplicate the demo.golaika.com folder. Name the folder with the exact name of the domain that you will be running the Laika dashboard from.
- You can create as many pack members as you need.
- Each pack member requires a separate database to store data.
- Follow these instructions to obtain the necessary Google API credentials.
- Store the resulting
.p12file in the pack member's folder.
Within each pack member folder is a file called collar.php that contains all of the credentials and customizations needed for that pack member. This file contains the following variables:
| Variable | Description |
|---|---|
LANGUAGE |
The name of the file in the /translations/ folder that will be used to provide localization support. |
DEBUG |
If TRUE, Laika will provide more verbose output, including error notices from PHP itself. |
FETCH_THROTTLE_DELAY |
The number of seconds to wait between each API call. |
DB_NAME |
The name of the database to interact with. |
DB_USER |
The username for that database. |
DB_PASS |
The password for that database user. |
CREDENTIAL_NAME |
You'll get this from the previous step, it will appear to be a very long email address ending in something similar to iam.gserviceaccount.com. |
CREDENTIAL_FILE |
Provide the path to the .p12 file, omitting the /pack-members/ path. For example, demo.golaika.com/client_secrets.p12. |
While this is usually unnecessary, the following variables are provided in the event that you wish to customize the name of the data storage tables within the database:
TBL_DATATBL_SITESTBL_GOALSTBL_METRICSTBL_MENU_GROUPSTBL_MENU_ITEMS
Ensure the security of your pack by:
- Creating a unique username and password for each pack member database.
- Preventing Apache from allowing visitors to browse to
collar.phpor any*.p12file within the/pack-members/folders. - Restricting file system access to the
/pack-members/files to privileged users only.
If your environment requires a custom report layout, it should be created as a file directly within the pack member folder for that domain.
- The sample pack member domain
demo.golaika.comcontains two sample reports that can be used as a starting point for other custom report layouts.
Laika's dashboard can be configured to send usage statistics to Google Analytics via Google Tag Manager.
- Create a Google Analytics account to store dashboard data.
- Link to that account using Google Tag manager.
- Set
$GTM_IDincollar.phpwith the ID for the GTM container (just provide the GTM ID, which looks likeGTM-XXXXXX).