{"id":20672078,"url":"https://github.com/workarea-commerce/workarea-google-analytics","last_synced_at":"2026-07-03T19:33:33.073Z","repository":{"id":56898466,"uuid":"203651227","full_name":"workarea-commerce/workarea-google-analytics","owner":"workarea-commerce","description":null,"archived":false,"fork":false,"pushed_at":"2020-02-20T17:03:14.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-18T07:56:10.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workarea-commerce.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-21T19:28:33.000Z","updated_at":"2020-02-04T20:33:27.000Z","dependencies_parsed_at":"2022-08-21T02:20:36.663Z","dependency_job_id":null,"html_url":"https://github.com/workarea-commerce/workarea-google-analytics","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Fworkarea-google-analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Fworkarea-google-analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Fworkarea-google-analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Fworkarea-google-analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workarea-commerce","download_url":"https://codeload.github.com/workarea-commerce/workarea-google-analytics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242891240,"owners_count":20202318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T20:31:48.170Z","updated_at":"2025-10-29T12:47:58.396Z","avatar_url":"https://github.com/workarea-commerce.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"WebLinc Google Analytics\n================================================================================\n\nA Workarea Commerce plugin for Google Analytics.\n\nThis plugin adds the Google Analytics (GA) script to the head of the site.\nIt also adds an analytics adapter and registers several callbacks for Workarea events which send a payload of data to GA.\nThis includes advanced ecommerce events, as well as custom events.\n\nAll OOTB events are listed below, payloads contain sample data.\n\nGetting Started\n--------------------------------------------------------------------------------\n\nAdd the gem to your application's Gemfile:\n\n```ruby\n# ...\ngem 'workarea-google_analytics'\n# ...\n```\n\nUpdate your application's bundle.\n\n```bash\ncd path/to/application\nbundle\n```\n\nConfiguration\n--------------------------------------------------------------------------------\n\nTo integrate your Workarea application with Google Analytics you need configure your host application with your Google Analytics tracking ID in the \"Analytics\" section on the configuration page within the admin UI.\n\nShared Payloads\n--------------------------------------------------------------------------------\n\nThese payloads are shared by many of the events detailed in the Summary of events below\n\n#### Product Analytics data\n\nPayload:\n\n    id: \"4559F84840\",\n    name: \"Slim Ankle Pants\",\n    sku: \"292205283-4\",\n    sale: false,\n    price: 31.56,\n    category: \"Women's Pants\"\n\n---\n\n#### Order Analytics Data\n\nPayload:\n\n    site_name: 'Site Name',\n    id: 'CF6D17E28B',\n    promo_codes: ['10percentoff'],\n    shipping_service: 'USPS',\n    shipping_total: 7.00,\n    tax_total: 6.39,\n    total_price: 84.23,\n    tenders: 'Visa',\n    items: Order Item Analytics Data (below) for each item in order.\n\n---\n\n#### Order Item Analytics Data\n\nPayload:\n\n    id: \"4559F84840\",\n    product_id: \"4559F84840\",\n    product_name:  \"Slim Ankle Pants\",\n    sku: \"292205283-4\",\n    price: 31.56,\n    quantity: 1,\n    category: \"Women's Pants\"\n\n\nSummary of Events\n--------------------------------------------------------------------------------\n#### Page View\n- Sent on every page, along with other events.\n- No payload.\n- No Events\n\n---\n\n#### Category View\n\nSent on category show pages (aka product browse)\n\nPayload:\n\n    name: \"Women's Pants\",\n    sort: \"top_sellers\",\n    page: 1,\n    filters: {\n        color: ['Red', 'Blue'],\n        size: ['Small'],\n        price: ['30.0-39.99']\n    }\n\nSends 4 events:\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'category' | 'view' | \"Women's Pants\" |  |\n| 'category' | 'view' | \"top_sellers\" |  |\n| 'category' | 'view' | 'page: 1' |  |\n| 'category' | 'view' | 'color: Red, Blue' |  |\n| 'category' | 'view' | 'size: Small' |  |\n| 'category' | 'view' | 'price: 30.0-39.99' |  |\n\n---\n\n#### Search Results View\nSent on search results page\n\nPayload:\n\n    terms: 'red shirt',\n    sort: 'relevance',\n    page: 1,\n    filters:  {\n        size: ['Small'],\n        price: ['30.0-39.99']\n    },\n    totalResults: 4\n\nSends 4 events:\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'search results' | 'view' | 'red shirt' |  |\n| 'search results' | 'view' | 'relevance' |  |\n| 'search results' | 'view' | 'page: 1' |  |\n| 'search results' | 'view' | 'size : small' |  |\n| 'search results' | 'view' | 'price : 30.0-39.99' |  |\n\n---\n\n#### Product List\nSent anywhere there are lists of products, including: product browse, search results, cart page, product recommendations, category summary content block, product list content block.\n\nPayload:\n\n  name: 'Search results for \"Red Shirt\"', (name of the list e.g. 'Cart' or 'Custom product list')\n  page: 1,\n  per_page: 20,\n  impressions: Product Analytics Data\n\nSends enhanced ecommerce event 'ec:addImpression' with the following options:\n\n    'id': \"4559F84840\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n    'position': 1\n\n---\n\n#### Product Click\nTriggered when a user clicks on any product summary in the storefront.\n\nPayload: Product Analytics Data\n\nSends 3 events\n'ec:addProduct' with the following options:\n\n    'id':\"4559F84840\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n    'position': 1\n\n'ec:setAction' click\n\n    list: payload.list (the product list name)\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'product' | 'click' | \"Women's Pants\" |  |\n\n---\n\n### Product Quickview\nTriggered when a user opens a product quickview\n\nPayload: Product Analytics Data\n\nSends 3 events\n\n'ec:addProduct' with the following options:\n\n    'id':\"4559F84840\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n\n'ec:setAction' detail\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'product' | 'quickview' |  |  |\n\n---\n\n### Product View\nTriggered when a user visits the product detail page\n\nPayload - Product Analytics Data\n\nSends 2 events\n\n'ec:addProduct' with the following options:\n\n    'id':\"4559F84840\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n    'nonInteraction': true\n\n'ec:setAction' detail\n\n---\n\n### Add to cart\nTriggered when add to cart button is clicked\n\nPayload: Product Analytics Data\n\nSends 3 events\n\n'ec:addProduct' with the following options:\n\n    'id':\"4559F84840\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n    'price': 31.56,\n    'quantity': 1\n\n'ec:setAction' add\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'product' | 'click' | 'add to cart' |  |\n\n---\n\n### Cart View\nTriggered when the cart page is opened, including cart summaries (drawer or dropdown)\n\nPayload: Order Analytics Data\n\nSends 2 events\n\n'ec:addProduct' for each product in cart with the following options:\n\n    'id': \"5AE9E86D6C\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n    'price': 31.56,\n    'quantity': 1\n    'nonInteraction': true\n\n'ec:setAction' 'checkout' { 'step' : 1 }\n\n---\n\n### Update Cart Item\nTriggered when a cart item is updated (quantity changed)\n\nPayload: Order Item Analytics Data\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'product' | 'click' | 'update cart' |  |\n\n---\n\n### Add To Cart Confirmation\nTriggered when a cart item is added to the cart (confirmation dialog)\n\nPayload: Order Item Analytics Data\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'Add To Cart' | 'confirm' | 'item added' |  |\n\n---\n\n### Remove from Cart\nTriggered when a product is removed from the cart\n\nPayload: Order Item Analytics Data\n\nSends 3 events\n\n'ec:addProduct' with the following options:\n\n    'id': \"5AE9E86D6C\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n    'price': 31.56,\n    'quantity': 1\n\n'ec:setAction' remove\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'product' | 'click' | 'remove from cart' |  |\n\n---\n\n### Checkout Login\nTriggered when user logs in during checkout\n\nPayload: none\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'checkout' | 'start' | 'login' |  |\n\n---\n\n### Checkout Guest\nTriggered when user begins checkout as a guest (no login)\n\nPayload: none\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'checkout' | 'start' | 'guest' |  |\n\n---\n\n### Checkout Addresses View\nTriggered on the Addresses step of checkout\n\nPayload: Order Analytics Data\n\n'ec:addProduct' for each product in cart with the following options:\n\n    'id': \"5AE9E86D6C\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n    'price': 31.56,\n    'quantity': 1\n    'nonInteraction': true\n\n'ec:setAction' 'checkout' { 'step' : 2 }\n\n---\n\n### Checkout Shipping View\nTriggered on the Shipping step of checkout\n\n'ec:addProduct' for each product in cart with the following options:\n\n    'id': \"5AE9E86D6C\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n    'price': 31.56,\n    'quantity': 1\n    'nonInteraction': true\n\n'ec:setAction' 'checkout' { 'step' : 3 }\n\n---\n\n### Checkout Payment View\nTriggered on the Payment step of checkout\n\n'ec:addProduct' for each product in cart with the following options:\n\n    'id': \"5AE9E86D6C\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n    'price': 31.56,\n    'quantity': 1\n    'nonInteraction': true\n\n'ec:setAction' 'checkout' { 'step' : 4 }\n\n---\n\n### Checkout Payment Selected\nTriggered when a payment option is clicked on the payment step of checkout.\n\nPayload:\n\n    type: 'new card'\n\n'ec:setAction' 'checkout_option' { step: 4, option: payload.name }\n\n---\n\n### Checkout order placed\nTriggered on the order confirmation page of checkout\n\nPayload: Order Analytics Data\n\n'ec:addProduct' for each product in cart with the following options:\n\n    'id': \"5AE9E86D6C\",\n    'name': \"Slim Ankle Pants\",\n    'category': \"Women's Pants\",\n    'variant': \"292205283-4\",\n    'price': 31.56,\n    'quantity': 1\n    'nonInteraction': true\n\n'ec:purchase' with the following options:\n\n    'id': 'CF6D17E28B',\n    'affiliation': 'Site Name',\n    'revenue': 84.23,\n    'tax': 6.39,\n    'shipping': 7.00,\n    'coupon': ['10percentoff']\n\n---\n\n### Checkout Signup\nTriggered when user signs up for email notification in checkout\n\nPayload: none\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'checkout' | 'signup' |  |  |\n\n---\n\n### Login\nTriggered when user logs in to their account (not in checkout)\n\nPayload: none\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'account' | 'login' |  |  |\n\n---\n\n### Logout\nTriggered when user logs in to their account (not in checkout)\n\nPayload: none\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'account' | 'logout' |  |  |\n\n---\n\n### Forgot Password\nTriggered when user submits the forgot password form\n\nPayload: none\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'account' | 'forgot password' |  |  |\n\n---\n\n### Signup\nTriggered when user creates a new account (not in checkout)\n\nPayload: none\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'account' | 'signup' |  |  |\n\n---\n\n### Share\nTriggered when user clicks on one of the share buttons\n\nPayload:\n\n    type: share_type e.g. 'facebook'\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'share' | 'click' | 'facebook' |  |\n\n---\n\n### Email Signup\nTriggered when user signs up for email notifications (not in checkout)\n\nPayload: none\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'email' | 'signup' |  |  |\n\n---\n\n### Primary Navigation Click\nTriggered when user clicks on a link in the primary navigation\n\nPayload:\n\n    name: 'Sale'\n    url: 'www.yoursite.com/sale'\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'nav' | 'select' | 'Sale' |  |\n\n---\n\n### Checkout Edit\nTriggered when user clicks on an 'edit' button in checkout to change address or shipping.\n\nPayload:\n\n    type: step to edit ('addresses', 'shipping')\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'Edit Button' | 'click' | 'addresses' |  |\n\n---\n\n### Flash Message\nTriggered when a system flash message is shown\n\nPayload:\n\n    type: type (success | error | info)\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'Flash Messaging' | 'Flash Messaging Triggered' | 'success' |  |\n\n---\n\n### Validation Error\nTriggered when a jQuery validation message is displayed\n\nPayload:\n\n    location: checkout_page\n\nNote: if this event happens outside fo checkout the location is set to 'application'\n\n| category | action | label | value |\n|----------|--------|-------|-------|\n| 'JavaScript Validaton Error' | 'JavaScript Validation Error Triggered' | 'checkout - payment' |  |\n\n\nWorkarea Commerce Documentation\n--------------------------------------------------------------------------------\n\nSee [https://developer.workarea.com](https://developer.workarea.com) for Workarea Commerce documentation.\n\nLicense\n--------------------------------------------------------------------------------\n\nWorkarea Google Analytics is released under the [Business Software License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkarea-commerce%2Fworkarea-google-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkarea-commerce%2Fworkarea-google-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkarea-commerce%2Fworkarea-google-analytics/lists"}