const websiteUrl = config.website_url; // Usamos el config.website_url const lambdaEndpoint = config.lambdaEndpoint; // Usamos el config.lambdaEndpoint fetch(lambdaEndpoint, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ website_url: websiteUrl }), }) .then(response => response.json()) .then(data => { console.log('Full Response Data:', data); // Log to inspect the structure // Directly access updated_views without parsing, since body is already an object const updatedViews = data.updated_views; document.getElementById('views').innerText = updatedViews; }) .catch(error => console.error('Error:', error));