Different types of integration

Below you can find examples of Product API tracking code for all supported integration types.

Multi-regional support without grouped products

<script type="text/javascript">
    (window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
        retailrocket.products.post({
            "id": <product ID>,
            "name": "Example product name",
            "price": 777,
            "pictureUrl": "http://example.com/path/to/Photo.jpg",
            "url": "http://www.example.com/path/to/productPage",
            "isAvailable": true,
            "categoryPaths": ["Women/Clothes/Skirts","Women/New Arrivals"],
            "description": "Some text description",
            "vendor": "Brand name",
            "model": "Model name",
            "typePrefix": "Product type",
            "stockId": "Hague",
            "oldPrice": 999,
            "params": {
                    "<custom parameter 1 name>":  "<custom parameter 1 value>",
                    "<custom parameter 2 name>":  "<custom parameter 2 value>",
                    "<custom parameter N name>":  "<custom parameter N value>"
               }
        });
        rrApi.view(<product ID>);
    });
</script>

Multi-regional support with grouped products

<script type="text/javascript">
    (window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
        retailrocket.productsGroup.post({
            "groupId": <group ID>,
            "name": "<string>",
            "price": 777,
            "pictureUrl": "http://example.com/path/to/Photo.jpg",
            "url": "http://www.example.com/path/to/productPage",
            "isAvailable": true,			
            "categoryPaths": ["Example/Category/Path","Another/Category"],
            "description": "Some text description",
            "stockId": "Hague",
            "products": {
"<product id>": {
                       "isAvailable": <bool>,
                       "name": "<string>",
                       "color": "<string>",
                       "size": "<string>",
                       "url": "<string>",
                       "pictureUrl": "<string>",
                       "price": <decimal>,
                       "oldPrice": <decimal>,
                       "description": "<string>",
                       "params": {
                           "<custom parameter 1 name>": "<custom parameter 1 value>",
                           "<custom parameter 2 name>": "<custom parameter 2 value>",
                           "<custom parameter N name>": "<custom parameter N value>"
                       }	
                },
"<product id>": {
                       "isAvailable": <bool>,
                       "name": "<string>",
                       "color": "<string>",
                       "size": "<string>",
                       "url": "<string>",
                       "pictureUrl": "<string>",
                       "price": <decimal>,
                       "oldPrice": <decimal>,
                       "description": "<string>",
                       "params": {
                           "<custom parameter 1 name>": "<custom parameter 1 value>",
                           "<custom parameter 2 name>": "<custom parameter 2 value>",
                           "<custom parameter N name>": "<custom parameter N value>"
                       }	
                }
            },
            "vendor": "Brand name",
            "model": "Model name",
            "typePrefix": "Product type",
            "oldPrice": 999		
        });

        rrApi.groupView([<product IDs>]);
    });
</script>

With support for multilanguages and multicurrency, without multi-regions

<script type="text/javascript">
    (window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
        retailrocket.products.post({
            "id": <product ID>,
            "name": "Example product name",
            "price": 777,
            "pictureUrl": "http://example.com/path/to/Photo.jpg",
            "url": "http://www.example.com/path/to/productPage",
            "isAvailable": true,
            "categoryPaths": ["Women/Clothes/Skirts","Women/New Arrivals"],
            "description": "Some text description",
            "vendor": "Brand name",
            "model": "Model name",
            "typePrefix": "Product type",
            "oldPrice": 999,
            "params": {
                    "<custom parameter 1 name>": "<custom parameter 1 value>",
                    "<custom parameter 2 name>": "<custom parameter 2 value>",
                    "<custom parameter N name>": "<custom parameter N value>",
                    "languages": {
                      "<language1>": {
                        "description": "description in language1",
                        "name": "name in language1",
                        "url": "url to product in specific language",
                        "<custom parameter 1 name in language1>": "<custom parameter 1 value>",
                        "<custom parameter 2 name in language1>": "<custom parameter 2 value>",
                        "<custom parameter N name in language1>": "<custom parameter N value>"
                      },
                      "<language2>": {
                        "description": "description in language2",
                        "name": "name in language2",
                        "url": "url to product in specific language",
                        "<custom parameter 1 name in language2>": "<custom parameter 1 value>",
                        "<custom parameter 2 name in language2>": "<custom parameter 2 value>",
                        "<custom parameter N name in language2>": "<custom parameter N value>"
                      }
                    },
                    "currencies": {
                      "EUR": <price in EUR>,
                      "USD": <price in USD>
                    }
                }

        });
    });
</script>
<script type="text/javascript">
    (window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
        retailrocket.productsGroup.post({
            "groupId": <group ID>,
            "name": "<string>",
            "price": 777,
            "pictureUrl": "http://example.com/path/to/Photo.jpg",
            "url": "http://www.example.com/path/to/productPage",
            "isAvailable": true,			
            "categoryPaths": ["Example/Category/Path","Another/Category"],
            "description": "Some text description",
            "products": {
"<product id>": {
                       "isAvailable": <bool>,
                       "name": "<string>",
                       "color": "<string>",
                       "size": "<string>",
                       "url": "<string>",
                       "pictureUrl": "<string>",
                       "price": <decimal>,
                       "oldPrice": <decimal>,
                       "description": "<string>",
                       "params": {
                            "<custom parameter 1 name>": "<custom parameter 1 value>",
                            "<custom parameter 2 name>": "<custom parameter 2 value>",
                            "<custom parameter N name>": "<custom parameter N value>",
                            "languages": {
                              "<language1>": {
                                "description": "description in language1",
                                "name": "name in language1",
                                "url": "url to product in specific language",
                                "<custom parameter 1 name in language1>": "<custom parameter 1 value>",
                                "<custom parameter 2 name in language1>": "<custom parameter 2 value>",
                                "<custom parameter N name in language1>": "<custom parameter N value>"
                              },
                              "<language2>": {
                                "description": "description in language2",
                                "name": "name in language2",
                                "url": "url to product in specific language",
                                "<custom parameter 1 name in language2>": "<custom parameter 1 value>",
                                "<custom parameter 2 name in language2>": "<custom parameter 2 value>",
                                "<custom parameter N name in language2>": "<custom parameter N value>"
                              }
                            },
                            "currencies": {
                              "EUR": <price in EUR>,
                              "USD": <price in USD>
                            }
                        }
                },
"<product id>": {
                       "isAvailable": <bool>,
                       "name": "<string>",
                       "color": "<string>",
                       "size": "<string>",
                       "url": "<string>",
                       "pictureUrl": "<string>",
                       "price": <decimal>,
                       "oldPrice": <decimal>,
                       "description": "<string>",
                       "params": {
                            "<custom parameter 1 name>": "<custom parameter 1 value>",
                            "<custom parameter 2 name>": "<custom parameter 2 value>",
                            "<custom parameter N name>": "<custom parameter N value>",
                            "languages": {
                              "<language1>": {
                                "description": "description in language1",
                                "name": "name in language1",
                                "url": "url to product in specific language",
                                "<custom parameter 1 name in language1>": "<custom parameter 1 value>",
                                "<custom parameter 2 name in language1>": "<custom parameter 2 value>",
                                "<custom parameter N name in language1>": "<custom parameter N value>"
                              },
                              "<language2>": {
                                "description": "description in language2",
                                "name": "name in language2",
                                "url": "url to product in specific language",
                                "<custom parameter 1 name in language2>": "<custom parameter 1 value>",
                                "<custom parameter 2 name in language2>": "<custom parameter 2 value>",
                                "<custom parameter N name in language2>": "<custom parameter N value>"
                              }
                            },
                            "currencies": {
                              "EUR": <price in EUR>,
                              "USD": <price in USD>
                            }
                       }
            },
            "vendor": "Brand name",
            "model": "Model name",
            "typePrefix": "Product type",
            "oldPrice": 999
        });

        rrApi.groupView([<product IDs>]);
    });
</script>

With support for multilanguages, multicurrency and without multi-regions

<script type="text/javascript">
    (window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
        retailrocket.products.post({
            "id": <product ID>,
            "name": "Example product name",
            "price": 777,
            "pictureUrl": "http://example.com/path/to/Photo.jpg",
            "url": "http://www.example.com/path/to/productPage",
            "isAvailable": true,
            "categoryPaths": ["Women/Clothes/Skirts","Women/New Arrivals"],
            "description": "Some text description",
            "vendor": "Brand name",
            "model": "Model name",
            "typePrefix": "Product type",
            "oldPrice": 999,
            "stockId": "Hague",
            "params": {
                    "<custom parameter 1 name>": "<custom parameter 1 value>",
                    "<custom parameter 2 name>": "<custom parameter 2 value>",
                    "<custom parameter N name>": "<custom parameter N value>",
                    "languages": {
                      "<language1>": {
                        "description": "description in language1",
                        "name": "name in language1",
                        "url": "url to product in specific language",
                        "<custom parameter 1 name in language1>": "<custom parameter 1 value>",
                        "<custom parameter 2 name in language1>": "<custom parameter 2 value>",
                        "<custom parameter N name in language1>": "<custom parameter N value>"
                      },
                      "<language2>": {
                        "description": "description in language2",
                        "name": "name in language2",
                        "url": "url to product in specific language",
                        "<custom parameter 1 name in language2>": "<custom parameter 1 value>",
                        "<custom parameter 2 name in language2>": "<custom parameter 2 value>",
                        "<custom parameter N name in language2>": "<custom parameter N value>"
                      }
                    },
                    "currencies": {
                      "EUR": <price in EUR>,
                      "USD": <price in USD>
                    }
                }

        });
    });
</script>
<script type="text/javascript">
    (window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
        retailrocket.productsGroup.post({
            "groupId": <group ID>,
            "name": "<string>",
            "price": 777,
            "pictureUrl": "http://example.com/path/to/Photo.jpg",
            "url": "http://www.example.com/path/to/productPage",
            "isAvailable": true,			
            "categoryPaths": ["Example/Category/Path","Another/Category"],
            "description": "Some text description",
            "stockId": "Hague",
            "products": {
"<product id>": {
                       "isAvailable": <bool>,
                       "name": "<string>",
                       "color": "<string>",
                       "size": "<string>",
                       "url": "<string>",
                       "pictureUrl": "<string>",
                       "price": <decimal>,
                       "oldPrice": <decimal>,
                       "description": "<string>",
                       "params": {
                            "<custom parameter 1 name>": "<custom parameter 1 value>",
                            "<custom parameter 2 name>": "<custom parameter 2 value>",
                            "<custom parameter N name>": "<custom parameter N value>",
                            "languages": {
                              "<language1>": {
                                "description": "description in language1",
                                "name": "name in language1",
                                "url": "url to product in specific language",
                                "<custom parameter 1 name in language1>": "<custom parameter 1 value>",
                                "<custom parameter 2 name in language1>": "<custom parameter 2 value>",
                                "<custom parameter N name in language1>": "<custom parameter N value>"
                              },
                              "<language2>": {
                                "description": "description in language2",
                                "name": "name in language2",
                                "url": "url to product in specific language",
                                "<custom parameter 1 name in language2>": "<custom parameter 1 value>",
                                "<custom parameter 2 name in language2>": "<custom parameter 2 value>",
                                "<custom parameter N name in language2>": "<custom parameter N value>"
                              }
                            },
                            "currencies": {
                              "EUR": <price in EUR>,
                              "USD": <price in USD>
                            }
                        }
                },
"<product id>": {
                       "isAvailable": <bool>,
                       "name": "<string>",
                       "color": "<string>",
                       "size": "<string>",
                       "url": "<string>",
                       "pictureUrl": "<string>",
                       "price": <decimal>,
                       "oldPrice": <decimal>,
                       "description": "<string>",
                       "params": {
                            "<custom parameter 1 name>": "<custom parameter 1 value>",
                            "<custom parameter 2 name>": "<custom parameter 2 value>",
                            "<custom parameter N name>": "<custom parameter N value>",
                            "languages": {
                              "<language1>": {
                                "description": "description in language1",
                                "name": "name in language1",
                                "url": "url to product in specific language",
                                "<custom parameter 1 name in language1>": "<custom parameter 1 value>",
                                "<custom parameter 2 name in language1>": "<custom parameter 2 value>",
                                "<custom parameter N name in language1>": "<custom parameter N value>"
                              },
                              "<language2>": {
                                "description": "description in language2",
                                "name": "name in language2",
                                "url": "url to product in specific language",
                                "<custom parameter 1 name in language2>": "<custom parameter 1 value>",
                                "<custom parameter 2 name in language2>": "<custom parameter 2 value>",
                                "<custom parameter N name in language2>": "<custom parameter N value>"
                              }
                            },
                            "currencies": {
                              "EUR": <price in EUR>,
                              "USD": <price in USD>
                            }
                       }
            },
            "vendor": "Brand name",
            "model": "Model name",
            "typePrefix": "Product type",
            "oldPrice": 999
        });

        rrApi.groupView([<product IDs>]);
    });
</script>