{"id":19946,"date":"2020-04-17T09:06:19","date_gmt":"2020-04-17T09:06:19","guid":{"rendered":"http:\/\/refiner.io\/documentation\/?post_type=knowledgebase&#038;p=19946"},"modified":"2026-03-19T10:36:46","modified_gmt":"2026-03-19T10:36:46","slug":"client-introduction","status":"publish","type":"knowledgebase","link":"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/","title":{"rendered":"Install JavaScript SDK"},"content":{"rendered":"\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p id=\"block-6c4d0378-4bfd-4d90-a27f-341b4ad1c231\">Before you can launch surveys in your web-app, there are a couple of things you need to check first &#8211;  mostly making sure that our JavaScript SDK is installed correctly.<\/p>\n\n\n\n<p>You only need to do this once before launching your first survey. All future surveys can be created and configured using the Refiner dashboard without touching any code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install\">Installation Options<\/h2>\n\n\n\n<p>You can install our JavaScript SDK by simply copy &amp; pasting a code snippets, through Google Tag Manager, or as a NPM package.<\/p>\n\n\n\n<div class=\"wp-block-ugb-card ugb-card ugb-eb6cd10 ugb-card--v2 ugb-card--design-basic ugb-card--columns-1 ugb-main-block\"><style>.ugb-eb6cd10 .ugb-card__item1 .ugb-card__image{background-image:url(https:\/\/refiner.io\/documentation\/wp-content\/uploads\/2020\/04\/Refiner-JavaScript-Client-150x150.png)}.ugb-eb6cd10 .ugb-card__item2 .ugb-card__image{background-image:url(https:\/\/refiner.io\/documentation\/wp-content\/uploads\/2020\/04\/google-tag-manager-150x150.png)}.ugb-eb6cd10 .ugb-card__image{background-position:center center !important;background-repeat:no-repeat !important;background-size:contain !important;height:364px !important}@media screen and (min-width:768px) and (max-width:1025px){.ugb-eb6cd10 .ugb-card__image{height:300px !important}}@media screen and (max-width:768px){.ugb-eb6cd10 .ugb-card__image{height:300px !important}}<\/style><div class=\"ugb-inner-block\"><div class=\"ugb-block-content\"><div class=\"ugb-card__item ugb-card__item1\"><div class=\"ugb-card__content\"><h3 class=\"ugb-card__title\">JavaScript Code Snippet<\/h3><p class=\"ugb-card__description\">Our JavaScript code snippet is easy to install and works like most other 3rd party tracking scripts (e.g. Google Analytics). You need to have access to your HTML code or have a developer friend install the snippet for you.<\/p><div class=\"ugb-button-container\"><a class=\"ugb-button ugb-button--size-normal\" href=\"https:\/\/refiner.io\/docs\/kb\/getting-started\/javascript-code-snippet\/\" rel=\"\" title=\"\"><span class=\"ugb-button--inner\">Read more<\/span><\/a><\/div><\/div><\/div><\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-ugb-card ugb-card ugb-43be3b1 ugb-card--v2 ugb-card--design-basic ugb-card--columns-1 ugb-main-block\"><style>.ugb-43be3b1 .ugb-card__item1 .ugb-card__image{background-image:url(https:\/\/refiner.io\/documentation\/wp-content\/uploads\/2020\/04\/Refiner-JavaScript-Client-150x150.png)}.ugb-43be3b1 .ugb-card__item2 .ugb-card__image{background-image:url(https:\/\/refiner.io\/documentation\/wp-content\/uploads\/2020\/04\/google-tag-manager-150x150.png)}.ugb-43be3b1 .ugb-card__image{background-position:center center !important;background-repeat:no-repeat !important;background-size:contain !important;height:364px !important}@media screen and (min-width:768px) and (max-width:1025px){.ugb-43be3b1 .ugb-card__image{height:300px !important}}@media screen and (max-width:768px){.ugb-43be3b1 .ugb-card__image{height:300px !important}}<\/style><div class=\"ugb-inner-block\"><div class=\"ugb-block-content\"><div class=\"ugb-card__item ugb-card__item1\"><div class=\"ugb-card__content\"><h3 class=\"ugb-card__title\">Google Tag Manager<\/h3><p class=\"ugb-card__description\">With our Google Tag Manager plugin, you can install Refiner for your web application without requiring a developer to update the code. If you are already using Google Tag Manager, installing Refiner will only take a couple of clicks.<\/p><div class=\"ugb-button-container\"><a class=\"ugb-button ugb-button--size-normal\" href=\"https:\/\/refiner.io\/docs\/kb\/install-client\/google-tag-manager\/\" rel=\"\" title=\"\"><span class=\"ugb-button--inner\">Read more<\/span><\/a><\/div><\/div><\/div><\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-ugb-card ugb-card ugb-aa508e8 ugb-card--v2 ugb-card--design-basic ugb-card--columns-1 ugb-main-block\"><style>.ugb-aa508e8 .ugb-card__item1 .ugb-card__image{background-image:url(https:\/\/refiner.io\/documentation\/wp-content\/uploads\/2020\/04\/Refiner-JavaScript-Client-150x150.png)}.ugb-aa508e8 .ugb-card__item2 .ugb-card__image{background-image:url(https:\/\/refiner.io\/documentation\/wp-content\/uploads\/2020\/04\/google-tag-manager-150x150.png)}.ugb-aa508e8 .ugb-card__image{background-position:center center !important;background-repeat:no-repeat !important;background-size:contain !important;height:364px !important}@media screen and (min-width:768px) and (max-width:1025px){.ugb-aa508e8 .ugb-card__image{height:300px !important}}@media screen and (max-width:768px){.ugb-aa508e8 .ugb-card__image{height:300px !important}}<\/style><div class=\"ugb-inner-block\"><div class=\"ugb-block-content\"><div class=\"ugb-card__item ugb-card__item1\"><div class=\"ugb-card__content\"><h3 class=\"ugb-card__title\">NPM Package<\/h3><p class=\"ugb-card__description\">Our official NPM wrapper class provides a simple installation for modern web applications using the NPM or Yarn package manager.  <\/p><div class=\"ugb-button-container\"><a class=\"ugb-button ugb-button--size-normal\" href=\"https:\/\/refiner.io\/docs\/kb\/getting-started\/npm-package\/\" rel=\"\" title=\"\"><span class=\"ugb-button--inner\">Read more<\/span><\/a><\/div><\/div><\/div><\/div><\/div><\/div>\n\n\n\n<p><meta charset=\"utf-8\">We are working on providing more options to easily install Refiner on other platforms. Please don&#8217;t hesitate to reach out to our support team if you need help installing Refiner on your platform.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"integrate\">Identify users<\/h2>\n\n\n\n<p>Once our JavaScript SDK is installed, you can further integrate it with your platform. You&#8217;ll most likely want to identify your users to ensure you can correctly target your users.<\/p>\n\n\n\n<p>You can use the &#8220;<a href=\"https:\/\/refiner.io\/docs\/kb\/javascript-client\/reference\/#identify\">identifyUser<\/a>&#8221; method of our SDK to identify users. If you install Refiner with Google Tag Manager, you can find more information how to identify users <a href=\"https:\/\/refiner.io\/docs\/kb\/install-client\/google-tag-manager\/#identify\">here<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"track-events\">Track user events<\/h2>\n\n\n\n<p>You can also use the SDK to <a href=\"https:\/\/refiner.io\/docs\/kb\/segmentation\/tracking-user-events\/\">track user events<\/a>, launch surveys ad-hoc, register callbacks. You can learn more about all available options in the <a href=\"https:\/\/refiner.io\/docs\/kb\/javascript-client\/reference\/\">client reference<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"troubleshoot\">Troubleshoot installation<\/h2>\n\n\n\n<p>The JavaScript SDK has a built-in <a href=\"https:\/\/refiner.io\/docs\/kb\/install\/test-and-debug\/\">Debug Mode<\/a> that will help you track down installation issues quickly. You can also find a couple of tips on the pages covering each installation method, for example how to troubleshoot the Google Tag Manager installation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Rate limits<\/h2>\n\n\n\n<p>When using our JavaScript SDK to track user data and collect survey responses, the following rate limits apply:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Per environment<\/td><td>40.000 requests \/ minute<\/td><\/tr><tr><td>Per contact \/ user ID<\/td><td>100 requests \/ minute<\/td><\/tr><tr><td>Per IP address<\/td><td>300 requests \/ minute<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Before you can launch surveys in your web-app, there are a couple of things you need to check first &#8211; mostly making sure that our JavaScript SDK is installed correctly. You only need to do this once before launching your first survey. All future surveys can be created and configured using the Refiner dashboard [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","template":"","knowledgebase_tag":[],"class_list":["post-19946","knowledgebase","type-knowledgebase","status-publish","hentry","knowledgebase_cat-javascript-client"],"featured_image_urls_v2":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":"","ab-block-post-grid-landscape":"","ab-block-post-grid-square":"","gb-block-post-grid-landscape":"","gb-block-post-grid-square":""},"post_excerpt_stackable_v2":"<p>Introduction Before you can launch surveys in your web-app, there are a couple of things you need to check first &#8211; mostly making sure that our JavaScript SDK is installed correctly. You only need to do this once before launching your first survey. All future surveys can be created and configured using the Refiner dashboard without touching any code. Installation Options You can install our JavaScript SDK by simply copy &amp; pasting a code snippets, through Google Tag Manager, or as a NPM package. JavaScript Code SnippetOur JavaScript code snippet is easy to install and works like most other 3rd&hellip;<\/p>\n","category_list_v2":"","author_info_v2":{"name":"Moritz Dausinger","url":"https:\/\/refiner.io\/docs\/author\/user\/"},"comments_num_v2":"0 comments","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Install JavaScript SDK<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install JavaScript SDK\" \/>\n<meta property=\"og:description\" content=\"Introduction Before you can launch surveys in your web-app, there are a couple of things you need to check first &#8211; mostly making sure that our JavaScript SDK is installed correctly. You only need to do this once before launching your first survey. All future surveys can be created and configured using the Refiner dashboard [...]Read More...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/\" \/>\n<meta property=\"og:site_name\" content=\"Refiner Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-19T10:36:46+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/\",\"url\":\"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/\",\"name\":\"Install JavaScript SDK\",\"isPartOf\":{\"@id\":\"https:\/\/refiner.io\/docs\/#website\"},\"datePublished\":\"2020-04-17T09:06:19+00:00\",\"dateModified\":\"2026-03-19T10:36:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/refiner.io\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install JavaScript SDK\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/refiner.io\/docs\/#website\",\"url\":\"https:\/\/refiner.io\/docs\/\",\"name\":\"Refiner Documentation\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/refiner.io\/docs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/refiner.io\/docs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/refiner.io\/docs\/#organization\",\"name\":\"Refiner Documentation\",\"url\":\"https:\/\/refiner.io\/docs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/refiner.io\/docs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/refiner.io\/docs\/wp-content\/uploads\/2022\/11\/cropped-Group-8.png\",\"contentUrl\":\"https:\/\/refiner.io\/docs\/wp-content\/uploads\/2022\/11\/cropped-Group-8.png\",\"width\":400,\"height\":61,\"caption\":\"Refiner Documentation\"},\"image\":{\"@id\":\"https:\/\/refiner.io\/docs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install JavaScript SDK","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/","og_locale":"en_US","og_type":"article","og_title":"Install JavaScript SDK","og_description":"Introduction Before you can launch surveys in your web-app, there are a couple of things you need to check first &#8211; mostly making sure that our JavaScript SDK is installed correctly. You only need to do this once before launching your first survey. All future surveys can be created and configured using the Refiner dashboard [...]Read More...","og_url":"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/","og_site_name":"Refiner Documentation","article_modified_time":"2026-03-19T10:36:46+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/","url":"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/","name":"Install JavaScript SDK","isPartOf":{"@id":"https:\/\/refiner.io\/docs\/#website"},"datePublished":"2020-04-17T09:06:19+00:00","dateModified":"2026-03-19T10:36:46+00:00","breadcrumb":{"@id":"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/refiner.io\/docs\/kb\/javascript-client\/client-introduction\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/refiner.io\/docs\/"},{"@type":"ListItem","position":2,"name":"Install JavaScript SDK"}]},{"@type":"WebSite","@id":"https:\/\/refiner.io\/docs\/#website","url":"https:\/\/refiner.io\/docs\/","name":"Refiner Documentation","description":"","publisher":{"@id":"https:\/\/refiner.io\/docs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/refiner.io\/docs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/refiner.io\/docs\/#organization","name":"Refiner Documentation","url":"https:\/\/refiner.io\/docs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/refiner.io\/docs\/#\/schema\/logo\/image\/","url":"https:\/\/refiner.io\/docs\/wp-content\/uploads\/2022\/11\/cropped-Group-8.png","contentUrl":"https:\/\/refiner.io\/docs\/wp-content\/uploads\/2022\/11\/cropped-Group-8.png","width":400,"height":61,"caption":"Refiner Documentation"},"image":{"@id":"https:\/\/refiner.io\/docs\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/refiner.io\/docs\/wp-json\/wp\/v2\/knowledgebase\/19946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/refiner.io\/docs\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/refiner.io\/docs\/wp-json\/wp\/v2\/types\/knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/refiner.io\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/refiner.io\/docs\/wp-json\/wp\/v2\/comments?post=19946"}],"version-history":[{"count":96,"href":"https:\/\/refiner.io\/docs\/wp-json\/wp\/v2\/knowledgebase\/19946\/revisions"}],"predecessor-version":[{"id":28303,"href":"https:\/\/refiner.io\/docs\/wp-json\/wp\/v2\/knowledgebase\/19946\/revisions\/28303"}],"wp:attachment":[{"href":"https:\/\/refiner.io\/docs\/wp-json\/wp\/v2\/media?parent=19946"}],"wp:term":[{"taxonomy":"knowledgebase_tag","embeddable":true,"href":"https:\/\/refiner.io\/docs\/wp-json\/wp\/v2\/knowledgebase_tag?post=19946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}