Skip to content

Commit

Permalink
Deploying to gh-pages from @ 2cd1662 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchthorson committed Sep 9, 2024
1 parent 0a9061d commit 5de85c5
Show file tree
Hide file tree
Showing 185 changed files with 746 additions and 559 deletions.
4 changes: 2 additions & 2 deletions assets/Analytics-Bob8DgDW.js → assets/Analytics-D8Rz5hz7.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import{j as e}from"./jsx-runtime-DHN5EbNM.js";import{u as a}from"./index-m63oy7Hv.js";import{S as r}from"./Analytics.stories-BkPdg66Z.js";import{M as s,b as c,a as o}from"./index-BKn5aWQS.js";import"./index-BBBE8JtA.js";import"./iframe-DGJshF_D.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-DXimoRZY.js";import"./index-lamZ5WrB.js";import"./lifecycle-BNS46k4e.js";import"./spread-CgU5AtxT.js";import"./Analytics-Bob8DgDW.js";import"./collect-stories-D1soPxiK.js";import"./index-B4WlZuP_.js";import"./index-DrFu-skq.js";function i(n){const t={code:"code",h1:"h1",h2:"h2",p:"p",...a(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Components/Analytics",of:r}),`
import{j as e}from"./jsx-runtime-BM-tSR00.js";import{u as a}from"./index-BrGNBq-8.js";import{S as r}from"./Analytics.stories-BtDQ4G4y.js";import{M as s,b as c,a as o}from"./index-D9_fEFSv.js";import"./index-CNR4smqS.js";import"./iframe-BGnyHB_Z.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-DXimoRZY.js";import"./index-Dy1J9qof.js";import"./lifecycle-mCW1c9RL.js";import"./spread-CgU5AtxT.js";import"./Analytics-D8Rz5hz7.js";import"./collect-stories-DS3D1-He.js";import"./index-B4WlZuP_.js";import"./index-DrFu-skq.js";function i(n){const t={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...a(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Components/Analytics",of:r}),`
`,e.jsx(t.h1,{id:"analytics",children:"Analytics"}),`
`,e.jsx(t.p,{children:"A component that adds Urban Institute's Google Analytics to your page. This will enable tracking of page views and custom events in your project."}),`
`,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-js",children:`import { Analytics } from "@urbaninstitute/dataviz-components";
`})}),`
`,e.jsx(t.h2,{id:"properties",children:"Properties"}),`
`,e.jsxs(t.p,{children:["The ",e.jsx(t.code,{children:"Analytics"})," component has the following properties."]}),`
`,e.jsx(c,{}),`
Expand All @@ -24,21 +26,22 @@ import { Analytics } from "@urbaninstitute/dataviz-components";
import { logClickToGA } from "@urbaninstitute/dataviz-components";
/**
* sends event data to GTM and GA. call in event handlers for each event type you wish to track.
* A function that logs a click event to Google Analytics.
* @param {HTMLElement} target The DOM element that triggered the event.
* @param {string} eventName A string in the format "event_name--event_specifics" where "event_name is the type of event, such as "map_click" or "dropdown_select" and "event_specifics" refers to the selected option, region, or specific function.
*/
logClickToGA(target, eventName);
`,language:"js"}),`
- sends event data to GTM and GA. call in event handlers for each event type you wish to track.
- A function that logs a click event to Google Analytics.
- @param {HTMLElement} target The DOM element that triggered the event.
- @param {string} eventName A string in the format "event_name--event_specifics" where "event_name is the type of event, such as "map_click" or "dropdown_select" and "event_specifics" refers to the selected option, region, or specific function.
*/
logClickToGA(target, eventName);
`,language:"js"}),`
`,e.jsx(t.p,{children:"An example of logClickToGA in action:"}),`
`,e.jsx(o,{dark:!0,code:`
import { logClickToGA } from "@urbaninstitute/dataviz-components";
myElement.addEventListener("click", (e) => {
logClickToGA(
e.target,
"map_click--" + e.detail.hoverData.hoverCounty + ", " + e.detail.hoverData.hoverStateName
);
logClickToGA(
e.target,
"map_click--" + e.detail.hoverData.hoverCounty + ", " + e.detail.hoverData.hoverStateName
);
});
`,language:"js"})]})}function C(n={}){const{wrapper:t}={...a(),...n.components};return t?e.jsx(t,{...n,children:e.jsx(i,{...n})}):i(n)}export{C as default};
1 change: 0 additions & 1 deletion assets/Analytics.stories-BkPdg66Z.js

This file was deleted.

1 change: 1 addition & 0 deletions assets/Analytics.stories-BtDQ4G4y.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5de85c5

Please sign in to comment.