Repro - Mobile Analytics for growth
日本語
Sign Up Back to Dashboard
  • System Requirements
  • Dashboard Guide
  • Development Guide
    • Signup
    • iOS/Android SDK
    • Web
      • Get Started
      • User ID
      • User Profile
      • Event Tracking
      • Session Lifecycle
      • Device ID
      • Opt-out feature
      • Migration from Version 1 to Version 2
      • API
        • Setup / SetUserID
          • reproio('setup', token, options)
          • reproio('setUserID', userID)
        • Event Tracking
          • reproio('track', name, properties)
          • reproio('trackAddPaymentInfo', properties)
          • reproio('trackAddToCart', content_id, properties)
          • reproio('trackAddToWishlist', properties)
          • reproio('trackCompleteRegistration', properties)
          • reproio('trackInitiateCheckout', properties)
          • reproio('trackLead', properties)
          • reproio('trackPurchase`, content_id, value, currency, properties)
          • reproio('trackSearch', properties)
          • reproio('trackShare', properties)
          • reproio('trackViewContent', content_id, properties)
        • User Profile
          • reproio('setDateUserProfile', key, value)
          • reproio('setDoubleUserProfile', key, value)
          • reproio('setIntUserProfile', key, value)
          • reproio('setStringUserProfile', key, value)
          • reproio('setUserEmailAddress', value)
          • reproio('setUserGender', value)
        • Device ID
          • reproio('getDeviceID')
        • Opt-out feature
          • reproio('isOptedIn')
          • reproio('optIn')
          • reproio('optOut')
        • Cross-Domain Tracking
          • reproio('updateLinkerParameters')
        • Other
          • reproio('version')
      • Cross-Domain Tracking
      • Using Web SDK with WebView
      • Implement to SPA(Single Page Application) site
      • Web Push Notification
      • Check that Repro Web measurement tags are working properly
      • Cookies used by Repro Web
    • Audience API
    • Audience Import(β)
    • Push API
    • User Profile API
    • User Profile Bulk Import
    • NewsFeed API
    • Deletion Targeted User Registration API
    • Booster installation guide
    • Mail(β)
  • Release Notes
  • FAQ

API¶

Setup / SetUserID¶

reproio('setup', token, options)¶

  • token: string (required)
    • set Your Repro SDK Token

  • options: object

Available Options:

Key Value

Description

disable_ip_list array (string)

Set the exclude global IP. (e.g. ["111.111.1.1"])

log_level string

Select from: "info", "warn", "error", "none". This setting suppresses console messages . (Default: 'default')

opt_out_by_default boolean

Select from: "info", "warn", "error", "none". This setting suppresses console messages . (Default: 'default')

silver_egg_uid_storage_key string

Set a cookie key that contains a user ID for Silver Egg Recommendation messages.

allow_webview boolean

This setting configures whether to activate Repro Web on WebView environments.

linker_domains array (string)

This setting configures Repro Web to share user tracking data between completely different domains. (e.g. ["example.com"])
Details: Cross-Domain Tracking

disable_linker_params_referrer_check boolean

When sharing data from the origin of the cross-domain site, the Web SDK first checks document.referrer to check if the access comes from the domain configured to work cross-domain. (default: false)
Details: Cross-Domain Tracking

disable_auto_attach_linker_params boolean

When Cross-Domain Tracking is activated, the Web SDK observes changes made to the DOM and add parameters to the tag links. By using the disable_auto_attach_linker_params option on this behavior will be turned off. Details: Cross-Domain Tracking

interval_days_to_storage_expiration integer

Storage expiration time until the data stored in Cookie including the user identifier expires (default: 730)

session_expiry_interval integer

Configures the timeout length in seconds until session is regarded continuous from the previous occurrences of an event (default: 1800000 = 30 minutes)

spa_mode string

Enable SPA mode. Avaiable values are 'history', 'hash' and 'none'. (defauilt: 'none')

close_messages_on_pagechange boolean

Automatically close all messages on page transitions in SPA mode. (default: false)

reuse_messages_on_pagechange string

In SPA mode, reuses messages and allows them to be displayed on every page transition. Valid values are 'unlimited', 'multitime', and 'none'. The 'unlimited' option reuses only messages that have no limit. For 'multitime', it will reuse messages that can be displayed multiple times with no limit on the number of times per day. In this case, messages may be displayed more than once if multiple browsers or tabs are used at the same time. For 'none', messages are not reused, and even messages with unlimited views are only displayed at regular intervals (3 minute in standard). (default: 'none')

close_messages_by_in_page_link boolean

Close all messages when clicking on a in-page link (e.g. <a href="#foo">). This setting will be ignored when spa_mode is hash. (default: true)

cookie_domain string

You can set the domain of the cookie to be recorded by the Web SDK. If omitted, the top level Apex Domain of the current site ( example.com for shop.example.com ) will be used.

Example:

<script>
    !function(o,e,n){var r=[];if(window.reproio)console.info("Repro Web SDK was loaded more than once");else{window.reproio=function(){r.push(arguments)};var i=o.createElement(e),t=o.getElementsByTagName(e)[0];i.src="https://cdn.reproio.com/web/v2/repro-sdk.min.js",i.async=!0,i.crossOrigin="",i.onload=function(){window.reproio("setSnippetVersion","2.1"),r.forEach(function(o){window.reproio.apply(window.reproio,o)})},t.parentNode.insertBefore(i,t)}}(document,"script");
    reproio("setup", "YOUR_REPRO_SDK_TOKEN");
</script>

See also: Get Started

reproio('setUserID', userID)¶

  • userID: string (required)
    • String value to identify user

    • before setting reproio("setup", "YOUR_REPRO_SDK_TOKEN")

reproio("setUserID", "xxxxxxxxxxxx");

See also: User ID

Event Tracking¶

reproio('track', name, properties)¶

  • name: string (required)
    • Name of tracked event

    • Event name starting with ___repro___ is not allowed.

    • null or empty string are not allowed for event names. Maximum length of event name is 191 characters.

  • properties: object
    • Set custom properties that are attached to the event

    • key: string
    • value: string | integer | double | date

Example:

// Custom event
reproio("track", "Finished tutorial");


// Custom event with properties
reproio("track", "user review", { rating: 3 });

See also: Event Tracking

reproio('trackAddPaymentInfo', properties)¶

  • properties: object

Available properties

Key Value

Description

content_id string

ID that specifies the product or the page

content_category string

Category of product or page

value double

Price of product

currency string

Currency unit of value

extras object

custom properties. See Adding custom properties

Example:

reproio("trackAddPaymentInfo", {
  value: 8000.0,
  currency: "JPY",
  content_category: "Clothing & Shoes > Mens > Clothing",
  content_id: "1234"
});

See also: Event Tracking

reproio('trackAddToCart', content_id, properties)¶

  • content_id: string (required)
    • ID that specifies the product or the page

  • properties: object

Available properties

Key Value

Description

content_name string

Name of product or page

content_category string

Category of product or page

value double

Price of product

currency string

Currency unit of value

extras object

custom properties. See Adding custom properties

Example:

reproio("trackAddToCart", "1234", {
  value: 5000.0,
  currency: "JPY",
  content_name: "Slim Jeans",
  content_category: "Clothing & Shoes > Mens > Clothing"
});

See also: Event Tracking

reproio('trackAddToWishlist', properties)¶

  • properties: object

Available properties

Key Value

Description

content_id string

ID that specifies the product or the page

content_name string

Name of product or page

content_category string

Category of product or page

value double

Price of product

currency string

Currency unit of value

extras object

custom properties. See Adding custom properties

Example:

 reproio("trackAddToWishlist", {
  value: 5000.0,
  currency: "JPY",
  content_name: "Slim Jeans",
  content_category: "Clothing & Shoes > Mens > Clothing",
  content_id: "1234"
});

See also: Event Tracking

reproio('trackCompleteRegistration', properties)¶

  • properties: object

Available properties

Key Value

Description

content_name string

Name of product or page

value double

Price of product

currency string

Currency unit of value

status string

Registration status

extras object

custom properties. See Adding custom properties

Example:

reproio("trackCompleteRegistration", {
  value: 8000.0,
  currency: "JPY",
  content_name: "Slim Jeans",
  status: "completed"
});

See also: Event Tracking

reproio('trackInitiateCheckout', properties)¶

  • properties: object

Available properties

Key Value

Description

content_id string

ID that specifies the product or the page

content_name string

Name of product or page

content_category string

Category of product or page

value double

Price of product

currency string

Currency unit of value

num_items integer

Number of purchases of the same item

extras object

custom properties. See Adding custom properties

Example:

reproio("trackInitiateCheckout", {
  value: 8000.0,
  currency: "JPY",
  content_name: "Slim Jeans",
  content_category: "Clothing & Shoes > Mens > Clothing",
  content_id: "1234"
});

See also: Event Tracking

reproio('trackLead', properties)¶

  • properties: object

Available properties

Key Value

Description

content_name string

Name of product or page

content_category string

Category of product or page

value double

Price of product

currency string

Currency unit of value

extras object

custom properties. See Adding custom properties

Example:

reproio("trackLead", {
  value: 8000.0,
  currency: "JPY",
  content_name: "Slim Jeans",
  content_category: "Clothing & Shoes > Mens > Clothing"
});

See also: Event Tracking

reproio('trackPurchase`, content_id, value, currency, properties)¶

  • content_id: string (required)
    • ID that specifies the product or the page

  • value: double (required)
    • Price of product

  • currency: string (required)
    • Currency unit of value

  • properties: object

Available properties

Key Value

Description

content_name string

Name of product or page

content_category string

Category of product or page

num_items integer

Number of purchases of the same item

extras object

custom properties. See Adding custom properties

Example:

reproio("trackPurchase", "1234", 8000.0, "JPY", {
  content_name: "Slim Jeans",
  content_category: "Clothing & Shoes > Mens > Clothing",
  num_items: 2
});

See also: Event Tracking

reproio('trackSearch', properties)¶

  • properties: object

Available properties

Key Value

Description

content_id string

ID that specifies the product or the page

content_category string

Category of product or page

value double

Price of product

currency string

Currency unit of value

search_string string

Search text submitted by the user

extras object

custom properties. See Adding custom properties

Example:

reproio("trackSearch", {
  value: 3000.0,
  currency: "JPY",
  content_category: "Clothing & Shoes > Mens > Clothing",
  search_string: "Jeans",
  content_id: "1234"
});

See also: Event Tracking

reproio('trackShare', properties)¶

  • properties: object

Available properties

Key Value

Description

content_id string

ID that specifies the product or the page

content_name string

Name of product or page

content_category string

Category of product or page

service_name string

service name

extras object

custom properties. See Adding custom properties

Example:

reproio("trackShare", {
  content_category: "Clothing & Shoes > Mens > Clothing",
  content_name: "Slim Jeans",
  content_id: "1234",
  service_name: "twitter"
});

See also: Event Tracking

reproio('trackViewContent', content_id, properties)¶

  • content_id: string (required)
    • ID that specifies the product or the page

  • properties: object

Available properties

Key Value

Description

content_name string

Name of product or page

content_category string

Category of product or page

value double

Price of product

currency string

Currency unit of value

extras object

custom properties. See Adding custom properties

Example:

reproio("trackViewContent", "1234", {
  value: 5000.0,
  currency: "JPY",
  content_name: "Slim Jeans",
  content_category: "Clothing & Shoes > Mens > Clothing"
});

See also: Event Tracking

User Profile¶

reproio('setDateUserProfile', key, value)¶

  • key: string(required)
    • Event name starting with ___repro___ is not allowed.

    • null or empty string are not allowed for event names. Maximum length of event name is 255 characters.

  • value: date (required)

Example:

var now = new Date();
reproio("setDateUserProfile", "LastLogin", now);

See also: User Profile

reproio('setDoubleUserProfile', key, value)¶

  • key: string(required)
    • Event name starting with ___repro___ is not allowed.

    • null or empty string are not allowed for event names. Maximum length of event name is 255 characters.

  • value: double (required)

Example:

reproio("setDoubleUserProfile", "Height", 176.5);

See also: User Profile

reproio('setIntUserProfile', key, value)¶

  • key: string(required)
    • Event name starting with ___repro___ is not allowed.

    • null or empty string are not allowed for event names. Maximum length of event name is 255 characters.

  • value: integer (required)

Example:

reproio("setIntUserProfile", "Age", 25);

See also: User Profile

reproio('setStringUserProfile', key, value)¶

  • key: string(required)
    • Event name starting with ___repro___ is not allowed.

    • null or empty string are not allowed for event names. Maximum length of event name is 255 characters.

  • value`: string (required)
    • Maximum value length is 255 characters.

Example:

reproio("setStringUserProfile", "Job", "Developer");

See also: User Profile

reproio('setUserEmailAddress', value)¶

  • value`: string (required)

Example:

reproio("setUserEmailAddress", "user@exmaple.com");

See also: User Profile

reproio('setUserGender', value)¶

  • value`: string (required)
    • Select from: "male", "female", "other"

// set the gender as "male"
reproio("setUserGender", "male");
// set the gender as "female"
reproio("setUserGender", "female");
// set the gender as "other"
reproio("setUserGender", "other");

See also: User Profile

Device ID¶

reproio('getDeviceID')¶

reproio('getDeviceID');

See also: Device ID

Opt-out feature¶

reproio('isOptedIn')¶

Return value:

Value

Description

true

Currently in the opted-in state.

false

Currently in the opted-out state.

reproio('isOptedIn');

See also: Opt-out feature

reproio('optIn')¶

reproio('optIn');

See also: Opt-out feature

reproio('optOut')¶

reproio('optOut');

See also: Opt-out feature

Cross-Domain Tracking¶

reproio('updateLinkerParameters')¶

reproio('updateLinkerParameters');

See also: Cross-Domain Tracking

Other¶

reproio('version')¶

The API returns current SDK version.

  • « Migration from Version 1 to Version 2
  • Cross-Domain Tracking »

About Us Careers Terms of Service Privacy Policy Cookie Policy

© 2022 Repro Inc.