adjust / web_sdk

41 stars 25 forks source link

Adjust.getWebUUID is not a function #36

Closed mohmoudbassam closed 2 years ago

mohmoudbassam commented 2 years ago

iam use the web sdk and i need to extract the uuid but when i call the getWebUUID function its return a null iam using this code

### Adjust.initSdk({
        appToken: 'iam using my main appToken', // required
        environment: 'sandbox', 
        attributionCallback: function (e, attribution) { 
        },

    });
    const webUUID = Adjust.getWebUUID();
YaraMatkova commented 2 years ago

Hi @mohmoudbassam, could you please share SDK verbose logs? Do you use npm or CDN?

mohmoudbassam commented 2 years ago

iam use the cdn

and this is my SDK verbose logs

[adjust-sdk] 2022-04-13T13:50:40.064Z INFO: Log level set to verbose [adjust-sdk] 2022-04-13T13:50:40.081Z INFO: Available storage is indexedDB [adjust-sdk] 2022-04-13T13:50:40.082Z LOG: Adjust SDK is starting with web_uuid set to c51f169e-ced2-4620-3123-cae0678d6648

and when i open the indexedDB find the web_uuid available

YaraMatkova commented 2 years ago

Thank you for the logs! Could you also share what do you see in logs when you try Adjust.getWebUUID()?

mohmoudbassam commented 2 years ago

image

this is what i seen

and this is my code image

YaraMatkova commented 2 years ago

Hm, I can't find any issues in the log 🤔 Could you please: 1) add console.log('web_uuid: ' + Adjust.getWebUUID()) into your code 2) close all incognito browser windows if any 3) open a new browser window in incognito mode 4) open browser development console 5) load your website

and then send the entire log?

ADDED: of course you can exclude or hide any sensitive data like appToken or whatever

mohmoudbassam commented 2 years ago

image i got this response

YaraMatkova commented 2 years ago

Hey @mohmoudbassam, the most likely this 400 (Bad request) means that web tracking was not enabled for your app. You could confirm it if you take a look to Network tab and check what error message was returned.

Unfortunately it's not possible to enable Web Tracking in the Dashboard. So you would need to contact your Adjust Account Manager or Customer Success Manager so that they can enable Web Tracking for you.

YaraMatkova commented 2 years ago

In case you have any other questions, feel free to comment.