Structure of the script
  • 25 Aug 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Structure of the script

  • Dark
    Light

Article summary

A typical installation of the script looks like this

<script>
    (function(){
        var autochatConfig = {
            assistantId: "INSERT ASSISTANTID",
            accessToken: "INSERT ACCESSTOKEN",          
            locale: "NL", // or EN/FR
            
            // To set up a link between the website and the car a consumer is looking at use one of these identification methods:
            currentCarVin: "PLACE CAR VIN NUMBER HERE",
            // - OR -
            licensePlate: "PLACE CAR LICENSE PLATE NUMBER HERE",
            // - OR -
            stockNumber: "PLACE CAR STOCK NUMBER HERE"
        };
        var s=document.createElement("script");s.src="https://static.chatclient.autochat.ai/release/autochat.js?ver=1",s.async=!0,s.defer=!0,s.addEventListener("load",function(){autochat.init(autochatConfig)}),document.body.appendChild(s);
    })()
</script>

Don’t use more than 1 vehicle identification method.


Was this article helpful?