{"version":3,"sources":["webpack:///./src/img/help/custom_props/filters_identification.png","webpack:///./src/pages/help/user-identification-custom-properties.js","webpack:///./src/components/help/helpImage/styled.js","webpack:///./src/components/help/helpImage/index.js","webpack:///./src/components/ui/image-modal.js","webpack:///./src/img/help/custom_props/session_player.png","webpack:///./src/icons/alertIcons.js","webpack:///./src/components/information/index.js","webpack:///./src/img/help/custom_props/session_list.png"],"names":["module","exports","related","link","title","description","Wrapped","Article","className","role","href","lang","style","marginBottom","inline","marginTop","color","src","img1","lazy","alt","img2","img3","fontWeight","fontSize","width","dir","margin","frontmatter","metaTitle","metaDescription","canonical","section","Card","styled","div","props","setMarginBottom","media","desktop","CardBody","HelpImage","cardStyle","defaultProps","Container","Box","Close","span","ImageWrapped","img","Image","ImageModal","escFunction","event","showModal","state","keyCode","closeModal","setState","openModal","window","innerWidth","componentDidMount","document","addEventListener","this","componentWillUnmount","removeEventListener","render","imgStyle","imgModalStyle","modal","onClick","loading","React","Component","warning","height","viewBox","fill","xmlns","fillRule","d","clipRule","success","danger","info","cx","cy","r","Alert","Text","p","Information","children","filterIcon","Object","entries","icons","filter","icon","undefined"],"mappings":"kFAAAA,EAAOC,QAAU,IAA0B,sE,oCCA3C,uMAkPMC,EAAU,CACd,CACEC,KAAM,0CACNC,MAAO,qCACPC,YAAa,yDAEf,CACEF,KAAM,iDACNC,MAAO,2CACPC,YAAa,uDAIXC,EAAUC,aApPA,WACd,OACE,6BACE,iUAOA,yBAAKC,UAAU,gCAAgCC,KAAK,SAApD,2GAEc,kBAAC,IAAD,CAAMC,KAAK,4CAAX,cAFd,KAIA,kBAAC,IAAD,6BACA,sKAKA,kBAAC,IAAD,CAAMC,KAAK,aAAaC,MAAO,CAAEC,aAAc,KAA/C,6FAOA,yEAC6C,kBAAC,IAAD,CAAMC,QAAM,GAAZ,wBAD7C,KAIA,kBAAC,IAAD,CAAMH,KAAK,aAAaC,MAAO,CAAEG,UAAW,KAA5C,uKAUA,yBAAKP,UAAU,gCAAgCC,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U,IAA0B,8D,qRCE9B2E,EACX,yBACEpE,UAAU,6BACViB,MAAM,MACNoD,OAAO,MACPC,QAAQ,YACRC,KAAK,eACLC,MAAM,8BAEN,0BACEC,SAAS,UACTC,EAAE,iYACFC,SAAS,YAEX,0BAAMD,EAAE,gHAGCE,EACX,yBACE5E,UAAU,qBACViB,MAAM,MACNoD,OAAO,MACPC,QAAQ,YACRC,KAAK,eACLC,MAAM,8BAEN,0BACEC,SAAS,UACTC,EAAE,mHACFC,SAAS,YAEX,0BACEF,SAAS,UACTC,EAAE,uGACFC,SAAS,aAIFE,EACX,yBACE7E,UAAU,2BACViB,MAAM,MACNoD,OAAO,MACPC,QAAQ,YACRC,KAAK,eACLC,MAAM,8BAEN,0BACEC,SAAS,UACTC,EAAE,gEACFC,SAAS,YAEX,0BAAMD,EAAE,gHAGCI,EACX,yBACE9E,UAAU,oBACViB,MAAM,MACNoD,OAAO,MACPC,QAAQ,YACRC,KAAK,eACLC,MAAM,8BAEN,0BACEC,SAAS,UACTC,EAAE,gEACFC,SAAS,YAEX,0BAAMD,EAAE,kNACR,4BAAQK,GAAG,IAAIC,GAAG,MAAMC,EAAE,OClExBC,EAAQxD,IAAOC,IAAV,yEAAGD,CAAH,ubA+BLyD,EAAOzD,IAAO0D,EAAV,wEAAG1D,CAAH,0DAMG2D,EAAc,SAAC,GAAgC,IAA9BC,EAA6B,EAA7BA,SAAU9E,EAAmB,EAAnBA,MAAOJ,EAAY,EAAZA,MACtCmF,EAAcC,OAAOC,QAAQC,GAAOC,QAAO,SAACC,GACjD,OAAOA,EAAK,KAAOpF,EAAQoF,EAAK,GAAK,QADvC,GAGA,OACE,kBAACV,EAAD,CAAOlF,UAAWQ,EAAOJ,MAAOA,GAC7BmF,EAAW,GACZ,kBAACJ,EAAD,KAAOG,KAWbD,EAAYlD,aAAe,CACzB/B,WAAOyF,I,qBC9DTrG,EAAOC,QAAU,IAA0B","file":"component---src-pages-help-user-identification-custom-properties-js-c860398ce89688fba019.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/filters_identification-718ac64eda0a9118fa1b69bb15f93e25.png\";","import React from 'react';\n\nimport Article, { SubTitle } from 'components/help/helpArticle';\nimport Image from 'components/help/helpImage';\nimport Code from 'components/help/codeSnippet';\nimport Link from 'components/ui/link';\nimport img1 from 'img/help/custom_props/session_list.png';\nimport img2 from 'img/help/custom_props/session_player.png';\nimport img3 from 'img/help/custom_props/filters_identification.png';\nimport { Information } from '../../components/information';\n\nconst Content = () => {\n return (\n
\n

\n If you identify users visiting your website in any way, you can pass that data to\n LiveSession. It will add another dimension to your research and provide you with valuable\n information about your visitor’s behavior. In LiveSession, you can define up to 50 custom\n properties for each session.\n

\n\n
\n To pass data to LiveSession, you have to install our tracking code first. You can learn how\n to do it in this guide.\n
\n Users identification\n

\n The most common way to identify a user is to use their name or email address. You can use\n one or both strings, according to your needs:\n

\n\n \n {`__ls(\"identify\", { \n name: \"Adam McKenzie\", \n email: \"adam@goodstuffinc.com\"\n});`}\n \n\n

\n To pass additional parameters, add them as {`params: {key: value}`}:\n

\n\n \n {`__ls(\"identify\", { \n name: \"Adam McKenzie\", \n email: \"adam@goodstuffinc.com\",\n params: {\n account_id: \"101\", \n plan: \"premium\" \n }\n});`}\n \n
\n Remember to update sample values. You have to trigger the function on every page view as we\n do not store custom properties’ values in any way.\n
\n\n \n Custom properties are available from the Starter plan up. If you’d like to add custom\n properties and you’re on a Micro plan, consider{' '}\n switching plans.\n \n\n

\n Sessions from identified users will be listed on the sessions list, along with their email\n addresses. From here, you will also be able to access all of the custom properties you\n passed to LiveSession:\n

\n\n \n\n

\n You can also access custom properties directly from the session player. They are available\n in the right panel, under the “Properties” tab:\n

\n\n \n

\n You can also use the user’s name, email address and custom parameters you passed as filters\n to search sessions matching your criteria:\n

\n\n \n\n Set custom properties without identifying users\n\n

\n You can pass custom properties to LiveSession without identifying your users. To do so, use\n the\n __ls("setCustomParams", data) function. Here’s an example of\n the snippet you can use to update sessions’ parameters:\n

\n\n \n {`__ls(\"setCustomParams\", {\n params: {\n order_id: \"123-abc-def\",\n plan: \"premium\",\n },\n});\n`}\n \n
\n Remember to update sample values. You have to trigger the function on every page view as we\n do not store custom properties’ values in any way.\n
\n
\n Custom Params Limitations\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n

\n Name\n

\n
\n

\n Type\n

\n
\n

\n Maximum length\n

\n
\n

\n Details\n

\n
\n

Name

\n
\n

String

\n
\n

128

\n
\n

Displays user names in app

\n
\n

Email

\n
\n

String

\n
\n

128

\n
\n

Displays user email

\n
\n

Params

\n
\n

JSON object

\n
\n

50 items

\n
\n

\n Valid JSON object {`{`}param1: value, param2: value, ... {`}`}\n

\n
\n

param.key

\n
\n

string

\n
\n

64

\n
\n

\n {`{`}\n key:value{`}`}\n

\n
\n

param.value

\n
\n

string

\n
\n

64

\n
\n

\n {`{`}key:value\n {`}`}\n

\n
\n
Rate limiting
\n\n

\n Calls to Record Session API (rs.livesession.io) for{' '}\n __ls('identify') are rate limited per-session to 5 requests\n per second and 10 request per minute. If these limits are exceeded, custom params won't\n be set.{' '}\n

\n
\n );\n};\n\nconst related = [\n {\n link: '/help/how-to-install-livesession-script',\n title: 'How to install LiveSession script?',\n description: 'Check how can you install LiveSession on any website.',\n },\n {\n link: '/help/how-to-check-if-my-tracking-script-works',\n title: 'How to check if my tracking script works',\n description: 'Check if your tracking code is installed correctly',\n },\n];\n\nconst Wrapped = Article(Content);\n\nexport const frontmatter = {\n metaTitle: 'How to identify users and add custom properties?',\n metaDescription:\n 'With LiveSession you can identify user by email and name. Check how to do that.',\n canonical: '/help/user-identification-custom-properties/',\n};\n\nexport default () => (\n \n);\n","import styled from 'styled-components';\nimport { media } from 'theme/breakpoints';\n\nexport const Card = styled.div`\n margin: ${(props) => (props.setMarginBottom ? '2rem 0' : '2rem 0 3rem')};\n border: none;\n\n ${media.desktop} {\n margin: ${(props) => (props.setMarginBottom ? '1.25rem 0' : '1.25rem 0 2rem')};\n }\n`;\n\nexport const CardBody = styled.div`\n box-shadow: 0px 0px 10px #00000029;\n padding: 0;\n`;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImageModal from 'components/ui/image-modal';\nimport * as Styled from './styled';\n\nconst HelpImage = (props) => {\n const { cardStyle, setMarginBottom } = props;\n return (\n \n \n \n \n \n );\n};\n\nexport default HelpImage;\n\nHelpImage.propTypes = {\n cardStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n setMarginBottom: PropTypes.bool,\n};\n\nHelpImage.defaultProps = {\n cardStyle: null,\n setMarginBottom: false,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\nconst Container = styled.div`\n top: 0;\n left: 0;\n position: fixed;\n width: 100%;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.4);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 99999;\n`;\n\nconst Box = styled.div`\n background-color: transparent;\n position: relative;\n width: 95vw;\n height: 95vh;\n padding: 1.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n`;\n\nconst Close = styled.span`\n position: absolute;\n font-size: 1.8rem;\n right: 20px;\n top: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n background-color: #fff;\n border-radius: 100px;\n width: 40px;\n height: 40px;\n padding-bottom: 3px;\n filter: drop-shadow(5px 1px 4px rgba(0, 0, 0, 0.2));\n z-index: 10;\n`;\n\nconst ImageWrapped = styled.img`\n max-width: 100%;\n max-height: 100%;\n display: block;\n margin: 0 auto;\n border: none;\n`;\nconst minWidthToShow = 600;\n\nconst Image = styled.img`\n border: 1px solid #eaebec;\n max-width: 100%;\n height: auto;\n\n @media (min-width: ${minWidthToShow}px) {\n cursor: pointer;\n }\n`;\n\nclass ImageModal extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n showModal: false,\n };\n }\n\n componentDidMount() {\n document.addEventListener('keydown', this.escFunction, false);\n }\n\n componentWillUnmount() {\n document.removeEventListener('keydown', this.escFunction, false);\n }\n\n escFunction = (event) => {\n const { showModal } = this.state;\n\n if (event.keyCode === 27 && showModal) {\n this.closeModal();\n }\n };\n\n closeModal = () => {\n this.setState({ showModal: false });\n };\n\n openModal = () => {\n if (window.innerWidth >= minWidthToShow) {\n this.setState({ showModal: true });\n }\n };\n\n render() {\n const { showModal } = this.state;\n const { src, imgStyle, imgModalStyle, alt, title, lazy } = this.props;\n\n const modal = (\n \n ×\n \n \n \n \n );\n\n return (\n <>\n \n {showModal && modal}\n \n );\n }\n}\n\nexport default ImageModal;\n\nImageModal.propTypes = {\n src: PropTypes.string.isRequired,\n imgStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.node]),\n imgModalStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.node]),\n alt: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n lazy: PropTypes.bool,\n};\n\nImageModal.defaultProps = {\n lazy: false,\n imgStyle: null,\n imgModalStyle: null,\n};\n","module.exports = __webpack_public_path__ + \"static/session_player-765edaab717e6fad82656d4847c652b2.png\";","import React from 'react';\n\nexport const warning = (\n \n \n \n \n);\nexport const success = (\n \n \n \n \n);\nexport const danger = (\n \n \n \n \n);\nexport const info = (\n \n \n \n \n \n);\n","import React from 'react';\nimport styled from 'styled-components';\n\nimport PropTypes from 'prop-types';\nimport * as icons from '../../icons/alertIcons';\n\nconst Alert = styled.div`\n margin: 1.5rem 0 1rem;\n border-radius: 4px;\n padding: 10px 12px 10px 16px;\n background-color: transparent;\n display: flex;\n align-items: center;\n & svg {\n align-self: center;\n line-height: 100%;\n width: 16px;\n height: 16px;\n }\n &.info {\n background-color: #cce5ff;\n border: 1px solid #b8daff;\n }\n &.success {\n background-color: #d4edda;\n border: 1px solid #c3e6cb;\n }\n &.warning {\n background-color: #fff3cd;\n border: 1px solid #ffeeba;\n }\n &.danger {\n background-color: #f8d7da;\n border: 1px solid #f5c6cb;\n }\n`;\n\nconst Text = styled.p`\n margin: 0 0 0 16px;\n width: fit-content;\n font-weight: 400;\n`;\n\nexport const Information = ({ children, color, style }) => {\n const [filterIcon] = Object.entries(icons).filter((icon) => {\n return icon[0] === color ? icon[1] : null;\n });\n return (\n \n {filterIcon[1]}\n {children}\n \n );\n};\n\nInformation.propTypes = {\n color: PropTypes.string.isRequired,\n children: PropTypes.node.isRequired,\n style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n};\n\nInformation.defaultProps = {\n style: undefined,\n};\n","module.exports = __webpack_public_path__ + \"static/session_list-293843513321cec9d95a5963d6f6f58a.png\";"],"sourceRoot":""}