File: samples/react/src/Components/Contact.js

Recommend this page to a friend!
  Classes of Arturs Sosins  >  Countly Web SDK  >  samples/react/src/Components/Contact.js  >  Download  
File: samples/react/src/Components/Contact.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Countly Web SDK
Track site accesses and errors the Countly API
Author: By
Last change:
Date: 6 months ago
Size: 719 bytes
 

Contents

Class file image Download
import React from 'react';
import Countly from 'countly-sdk-web';
import countlyImage from './countly.jpg';

function Contact() {
    const emailUsClick = () => {
        Countly.q.push(['add_event', {
            "key": "email-us-clicked",
            "count": 1
        }]);
        alert("Email us event triggered");
    }

    return (
        <div className="contact">
            <div>
                <img src={countlyImage} alt="Home"></img>
            </div>
            <div>
                <h1>support@count.ly</h1>
            </div>
            <div>
                <button className="email-us" onClick={emailUsClick}>Email us</button>
            </div>
        </div>
    );
}

export default Contact;