Skip to content

Instantly share code, notes, and snippets.

View rafalzawadzki's full-sized avatar
🍌
Coding something

Rafal Zawadzki rafalzawadzki

🍌
Coding something
View GitHub Profile
@rafalzawadzki
rafalzawadzki / lemon-squeezy-iframe-listener.js
Created May 5, 2024 08:44
🍋 Lemon Squeezy iFrame Listener - Google Ads conversion tracking, Google Analytics purchase event tracking
<script>
// Listen for message from the iframe
window.addEventListener('message', function(event) {
// Check if the message is the checkout success event
if (event.data.event && event.data.event === 'Checkout.Success') {
var orderDetails = event.data.data.order.data.attributes;
var orderItems = event.data.data.order.data.attributes.first_order_item;
var userNameParts = orderDetails.user_name.split(' ');
var lemonFirstName = userNameParts.shift(); // Get the first name
var lemonLastName = userNameParts.join(' '); // Combines the remaining parts as the last name

Node.js coding challenge

We are looking for people who can build great software, so we created this challenge to test your skills.

Brief

Lex users want to report to moderators posts that are inappropriate. The moderators want to be more efficient in resolving these reports. They decided to build a software that can automate their processes — the software that you're going to develop.

Your task is to provide APIs for a frontend application that satisfies all Product requirements described below.

This is important. We hope you can spend about 4 hours on this project. If you can finish faster - great! If not, limit yourself and don't spend much longer than 4 hours.