import uuid


GENDERS = {
    'female': 'Gender Female',
    'male': 'Gender Male'
}


def log_fetch(count, gender):
    label = GENDERS.get(gender, 'Gender Neutral')
    client_id = uuid.uuid4()
    # event = Event('API', 'Fetch', label=label, value=count)
    # report('UA-68765997-3', client_id, event)

from google_measurement_protocol import event, report
import uuid


GENDERS = {
    'female': 'Gender Female',
    'male': 'Gender Male'
}


def log_fetch(count, gender):
    label = GENDERS.get(gender, 'Gender Neutral')
    client_id = uuid.uuid4()
    data = event('API', 'Fetch', label=label, value=count)
    report('UA-68765997-3', client_id, data)

Add google measurement protocol back
Add google measurement protocol back

+ from google_measurement_protocol import event, report
  import uuid
  
  
  GENDERS = {
      'female': 'Gender Female',
      'male': 'Gender Male'
  }
  
  
  def log_fetch(count, gender):
      label = GENDERS.get(gender, 'Gender Neutral')
      client_id = uuid.uuid4()
-     # event = Event('API', 'Fetch', label=label, value=count)
+     data = event('API', 'Fetch', label=label, value=count)
-     # report('UA-68765997-3', client_id, event)
+     report('UA-68765997-3', client_id, data)
  
Add google measurement protocol back
## Code Before:
import uuid


GENDERS = {
    'female': 'Gender Female',
    'male': 'Gender Male'
}


def log_fetch(count, gender):
    label = GENDERS.get(gender, 'Gender Neutral')
    client_id = uuid.uuid4()
    # event = Event('API', 'Fetch', label=label, value=count)
    # report('UA-68765997-3', client_id, event)

## Instruction:
Add google measurement protocol back
## Code After:
from google_measurement_protocol import event, report
import uuid


GENDERS = {
    'female': 'Gender Female',
    'male': 'Gender Male'
}


def log_fetch(count, gender):
    label = GENDERS.get(gender, 'Gender Neutral')
    client_id = uuid.uuid4()
    data = event('API', 'Fetch', label=label, value=count)
    report('UA-68765997-3', client_id, data)
