Vanilla PHP
To install Suppa in a vanilla PHP application:
- Open your main PHP file that generates the HTML (often
index.php
or a common header file). - Add the Suppa script to the
<head>
section:
<!DOCTYPE html>
<html lang="en">
<head>
// ... other meta tags
<script
src="https://app.suppa.ai/integration/script.js"
data-api-key="<?php echo htmlspecialchars(getenv('SUPPA_API_KEY')); ?>">
</script>
</head>
<body>
<!-- Your PHP application content -->
</body>
</html>
For better security, store your Suppa API key in an environment variable and retrieve it using getenv()
.