Last active
December 21, 2015 09:19
-
-
Save tomfuertes/6284655 to your computer and use it in GitHub Desktop.
Senior Advisor DataLayer
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>Foo Bar</title> | |
| <!-- DATALAYER GOES HERE - JUST BEFORE </head> --> | |
| <script>var datalayer = {foo:"bar"};</script> | |
| </head> | |
| </html> |
This file contains hidden or 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
| /** | |
| * - window.datalayer will be used to pass information back | |
| * to Google Analytics and kissmetrics | |
| * - As a general rule of thumb, don't set any of the variables | |
| * below unless they are relevant to the page | |
| * i.e., DONT set `datalayer.reviews = 0;` on search pages | |
| * DO set `datalayer.reviews = 0;` on communities w/ 0 reviews | |
| */ | |
| var datalayer = { | |
| // ------------------------------------------ | |
| // Property: pagetype | |
| // Description: should be set across all pages | |
| // Requirements: This should be across all pages. Example values follow: | |
| // "home" | https://www.senioradvisor.com/ | |
| // "community" | https://www.senioradvisor.com/community_properties/49747-twin-oaks-estate | |
| // "community country" | https://www.senioradvisor.com/community_properties/list/US | |
| // "professionals county" | https://www.senioradvisor.com/professionals/list/US | |
| // "community state" | https://www.senioradvisor.com/community_properties/list/US/AK | |
| // "professionals state" | https://www.senioradvisor.com/professionals/list/US/AK | |
| // "community search" | https://www.senioradvisor.com/community_properties/list/US/AK/yakutat | |
| // "professionals search" | https://www.senioradvisor.com/professionals/list/US/AK/yakutat | |
| // "admin" | anything in the administrative section | |
| // "add review" | https://www.senioradvisor.com/community_properties/83561-the-village-at-the-arboretum/community_reviews/new | |
| // "landing" | https://www.senioradvisor.com/getting_started | |
| // "signin" | https://www.senioradvisor.com/users/sign_in | |
| // "signup" | https://www.senioradvisor.com/users/sign_up | |
| // ------------------------------------------ | |
| pagetype: "home", | |
| // ------------------------------------------ | |
| // Property: accounttype | |
| // Description: Account Type of authenticated user | |
| // "admin" | |
| // "community manager" | |
| // ------------------------------------------ | |
| accounttype: "admin", | |
| // ------------------------------------------ | |
| // Property: searchtype | |
| // Description: Filtered Search Type when set on either community or professional pages | |
| // ------------------------------------------ | |
| searchtype: "alzheimer's/memory care", | |
| // ------------------------------------------ | |
| // Property: sort | |
| // Description: search page sort type used (pass even if default) | |
| // ------------------------------------------ | |
| sort: "rating", | |
| // ------------------------------------------ | |
| // Property: results | |
| // Description: quantity of search results found | |
| // ------------------------------------------ | |
| results: 675, | |
| // ------------------------------------------ | |
| // Property: page | |
| // Description: Current search result page displayed | |
| // ------------------------------------------ | |
| page: 2, | |
| // ------------------------------------------ | |
| // Property: breadcrumbs | |
| // Description: Colon seperated string of: | |
| // 1) "Communities" or "Professionals" (depending on page type) | |
| // 2) GEOGRAPHIC information for the current page | |
| // ------------------------------------------ | |
| // ex from: https://www.senioradvisor.com/community_properties/list/US/TX/austin/alzheimer-s-memory-care?&sort_by=distance | |
| breadcrumbs: "Communities:US:TX:Austin", | |
| // ------------------------------------------ | |
| // Property: organization | |
| // Description: organization name tied to community | |
| // (only on community pages) | |
| // ------------------------------------------ | |
| organization: "emeritus", | |
| // ------------------------------------------ | |
| // Property: rating | |
| // Description: Average Rating | |
| // (only on community pages) | |
| // ------------------------------------------ | |
| rating: 4.5, | |
| // ------------------------------------------ | |
| // Property: reviews | |
| // Description: Total number of reviews | |
| // ------------------------------------------ | |
| reviews: 5, | |
| // ------------------------------------------ | |
| // Property: verfiedreviews | |
| // Description: Total number of verfied reviews displayed | |
| // ------------------------------------------ | |
| verfiedreviews: 2, | |
| // ------------------------------------------ | |
| // Property: communityreviews | |
| // Description: Total number of community verified reviews displayed | |
| // ------------------------------------------ | |
| communityreviews: 2, | |
| // ------------------------------------------ | |
| // Property: unverifiedreviews | |
| // Description: Total number of unverfied reviews displayed | |
| // ------------------------------------------ | |
| unverifiedreviews: 1, | |
| // ------------------------------------------ | |
| // Property: photos | |
| // Description: Total number of CUSTOM photos | |
| // Should be "0" if they are using just the default ./app/assets/images/default_community_property.jpg | |
| // ------------------------------------------ | |
| photos: 5, | |
| // ------------------------------------------ | |
| // Property: defaultphoto | |
| // Description: True if they use the standard | |
| // False if they've 1+ custom images | |
| // ------------------------------------------ | |
| defaultphoto: false, | |
| // ------------------------------------------ | |
| // Property: claimedon | |
| // Description: ISO DATE of when property was claimed | |
| // (if this is not saved, then just use the boolean below) | |
| // ------------------------------------------ | |
| claimedon: "2013-08-18", | |
| // ------------------------------------------ | |
| // Property: claimed | |
| // Description: Boolean of whether property is claimed or not | |
| // (only need this if the date claimed above isn't saved) | |
| // ------------------------------------------ | |
| claimed: true | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment