famous-bird-26809
12/13/2023, 6:38 AMfamous-bird-26809
12/13/2023, 7:29 AMconsole.log(growthBook?.getExperiments())
console.log(growthBook?.getFeatures())
keep returning empty array for expirements:rhythmic-agent-34208
12/13/2023, 9:11 PMWhen it comes to Visual editor it seems like I can't see changes done in expirement so probably I missed something.What user permission level do you have globally, for this environment, and for this project? Can you please send me a screenshot of what you are able to see in the Visual Editor in relation to this issue? Please note that the Visual Editor may not work optimally with apps that are rendered by the client (more details here).
Why feature flags works well, while I cant see eny expirements in response configured in panel?This is likely due to my note above. How are you defining the features that you are able to see? From the GrowthBook UI?
famous-bird-26809
12/13/2023, 9:50 PMrhythmic-agent-34208
12/13/2023, 10:35 PMtrackingCallback: (experiment, result) => {
// TODO: Use your real analytics tracking system
console.log("Viewed Experiment", {
experimentId: experiment.key,
variationId: result.key,
});
},
Is this the actual code you are running, or were you just providing this as an example?famous-bird-26809
12/13/2023, 10:46 PMrhythmic-agent-34208
12/13/2023, 11:19 PMrhythmic-agent-34208
12/13/2023, 11:20 PMrhythmic-agent-34208
12/13/2023, 11:21 PMrhythmic-agent-34208
12/13/2023, 11:21 PMfamous-bird-26809
12/14/2023, 5:59 AMfamous-bird-26809
12/14/2023, 6:04 AMfamous-bird-26809
12/14/2023, 6:07 AMfamous-bird-26809
12/14/2023, 6:10 AM{
"key": "offer-investment-roi-v3",
"status": "running",
"variations": [
{
"css": "",
"js": "",
"domMutations": []
},
{
"css": "",
"js": "// Function to check and add the button\nfunction checkAndAddButton() {\n var buttons = document.querySelectorAll('button');\n var existingButton = null;\n\n // Check if the new button already exists\n var isOurButtonPresent = document.querySelector('button.new-custom-button');\n if (isOurButtonPresent) {\n return; // Exit the function if the new button is already there\n }\n\n // Find the \"Oblicz ratę\" button\n for (var i = 0; i < buttons.length; i++) {\n if (buttons[i].textContent.includes('Oblicz ratę')) {\n existingButton = buttons[i];\n break;\n }\n }\n\n // If the \"Oblicz ratę\" button is found, create the new button\n if (existingButton) {\n var newButton = document.createElement('button');\n newButton.classList.add('new-custom-button'); // Add a class to identify our new button\n\n // Set styles for the new button\n newButton.style.cssText = \"color: var(--c-primary); background-color: var(--c-gray1); \" +\n \"border: 1px solid rgb(221, 232, 253); height: 1.5rem; padding: 1px 0.25rem; \" +\n \"apperance: button; border-radius: var(--r-small);\";\n\n // Create and style the span element\n var newSpan = document.createElement('span');\n newSpan.textContent = 'Wylicz zysk z najmu';\n newSpan.style.cssText = \"color: var(--c-primary); font-size: .875rem; letter-spacing: 1.2px; \" +\n \"text-transform: uppercase; font-weight: 500;\";\n newButton.appendChild(newSpan);\n\n // Add click event listener to the new button\n newButton.addEventListener('click', function() {\n window.open('<https://morizon.typeform.com/to/qX7zzjxi>', '_blank');\n });\n\n // Insert the new button after the existing button\n existingButton.parentNode.insertBefore(newButton, existingButton.nextSibling);\n }\n}\n\n// Run the function every 2 seconds\nsetInterval(checkAndAddButton, 1000);\n",
"domMutations": []
}
],
"hashVersion": 2,
"hashAttribute": "",
"urlPatterns": [
{
"include": true,
"type": "simple",
"pattern": "/oferta/sprzedaz-mieszkanie*"
}
],
"weights": [
0.5,
0.5
],
"meta": [
{
"key": "0",
"name": "Control"
},
{
"key": "1",
"name": "Variation 1"
}
],
"filters": [],
"seed": "offer-investment-roi-v3",
"name": "offer-investment-roi-v3",
"phase": "0",
"coverage": 1
}
famous-bird-26809
12/14/2023, 6:12 AMrhythmic-agent-34208
12/19/2023, 11:48 PM