A/B testing กลายเป็น indispensable asset สำหรับ marketers และ website owners ที่แข่งขันใน digital economy วันนี้ มันอนุญาตให้ผู้ใช้ test existing ideas, experiment with new ones และ highlight what works และ what doesn't
โดยไม่มีข้อมูลนี้ การพยายาม optimize web pages อาจเป็น frustrating และ time-consuming process แต่เสียดายว่า A/B testing software อาจ expensive ป้องกันหลายคนไม่ได้เข้าถึงประโยชน์ของมัน
แต่ด้วย Redis โปรแกรมเมอร์ Thiago Camargo สามารถ remove barriers เหล่านี้โดยสร้าง open A/B testing tool ที่ operate ใน real time Redis's powerful data processing features อนุญาตให้ผู้ใช้ experiment with variables ที่เลือก และ discover most effective ways เพื่อ optimize web pages ของพวกเขา
มาดูว่า Thiago สร้างแอปพลิเคชันนี้ยังไง แต่ก่อนจะไปต่อ เราอยากชี้ว่ามี wide variety ของ innovative applications สำหรับคุณค้นพบบน Redis Launchpad
อย่าลืม browse หลังโพสต์นี้!
- What will you build?
- What will you need?
- Architecture
- Getting started
- How it works
1. What will you build?
คุณจะสร้าง A/B testing tool ที่ powerful แต่ simple ที่ scalable และ operate ใน real time ด้านล่างเราจะแสดงวิธีสร้าง application นี้จาก bottom up ไฮไลท์ components ที่จำเป็นพร้อม functionality
2. What will you need?
- Kotlin: ใช้เป็น open-sourced programming language ที่ Google ใช้พัฒนา Android apps ด้วย
- Gradle: ใช้เป็น build-automation tool สำหรับ multi-language software development
- Lettuce: สร้าง non-blocking reactive applications
- RedisGraph: sparse matrices เพื่อ represent adjacency matrix ใน graphs และ linear algebra เพื่อ query graph
- RedisTimeSeries: อนุญาตให้คุณ ingest และ query ล้านๆ samples และ events ด้วย hyper-efficiency
- RedisJSON: อนุญาต storing, updating, และ fetching JSON values จาก Redis keys
3. Architecture
- Experiment สร้างบน Swagger based on variables ที่คุณอยาก test บน website User คนนี้เลือก test impact ของสีต่างๆ ต่อ sales
- Trigger events กำหนด users ที่จะ enrolled ใน experiment โดยอัตโนมัติ
- Users ที่สมัคร subscription จะถูก record เป็น trigger event (a conversion) สีของที่แต่ละ trigger event จะถูก record เพื่อวัด results
What is A/B testing?
รู้จักในชื่อ split testing A/B testing หมายถึง systematic experimentation process ที่ two หรือ more versions ของ variable แสดงให้ website visitors เห็น เพื่อ determine 哪一版มี greater impact on conversions
มันออกแบบมาเพื่อเพิ่ม clarity ว่าคุณสามารถ position brand, products, และ services ได้อย่างมีประสิทธิภาพมากขึ้นในตลาด
สมมติว่า คุณมี product บน website ที่พยายามขาย Variable หนึ่งที่คุณสามารถ experiment จะเป็น call to action (CTA) button ถัดจาก product มีหลายวิธี A/B test CTA รวมถึง:
- Placement
- Design
- Colour
- Size
- Copywriting
โดย split testing variables เหล่านี้ คุณจะค้นพบว่า version ไหนของ CTA จะ optimal ที่สุดในการ drive conversions
4. Getting started
Prerequisites
- Docker
- Install Gradle 7.2
- Maven 3.8.1
- Install OpenJDK
- Swagger API documentation
Step 1: Clone the repository
Step 2. Performing the build task
Step 3: Set up Redis modules
หากคุณใช้ Docker desktop ให้แน่ใจว่า file sharing option enabled สำหรับ volume mount ใช้โค้ดด้านล่างเพื่อ set up Redis:
Step 4. Running the application
ใช้โค้ดด้านล่างเพื่อ start up docker:
How it works
Experiments API
ที่นี่เราจะแสดงวิธีสร้าง scalable A/B testing experiments พร้อม trigger-based weighted enrollment
How to create the experiment
ในขั้นตอนนี้ เราจะแสดงวิธีสร้าง experiment ที่ให้คุณ A/B test variables ต่างๆ เราจะใส่ตัวเองเป็น marketer ที่อยาก split test สีหน้าจอต่างๆ เพื่อดู impact ต่อ sales
เพื่อเริ่มต้น ใช้โค้ดด้านล่าง
值得一提的是 เราเปลี่ยน 'goalIds' ที่บนสุดเป็น 'purchase' เพื่อวัดจำนวน sales จากแต่ละสีหน้าจอ ด้านล่าง เราทำ 'id' ของ experiment เป็น 'subscription1'
เพื่อกำหนด trigger event เรา insert 'user-plan-screen-view' หมายถึงเมื่อ event triggered user จะ enrolled ใน experiment โดยอัตโนมัติ
ต่อไป เราระบุ variants เป็น 'red' และ 'blue' เนื่องจากนี่คือ 2 variables ที่เราจะ A/B test
How to retrieve the experiment
Response
Remote Config API
ที่นี่เราจะแสดงวิธีสร้าง dynamic และ scalable remote client configuration service (Firebase Replacement)
How to update the remote config
How to retrieve the remote config
Response
Event API
ขั้นตอนนี้เกี่ยวกับ Timeseries Event Indexing
How to push event
Summary API – Generic Summary Service
ที่นี่คือ simple และ flexible summary service ที่ capable ของ keep และ maintain summaries ของ multiple types ของ applications รวมถึง: game scoreboards, product ratings, user ratings, incremental metrics และอีกมากมาย
Updating a summary
Getting a Summary
Response:
Drawer API – Generic Key/Value Service
Flexible Property Storage
Updating a Drawer
Getting a Drawer
Response:
Some Used Redis Queries
Most of the commands used below are implemented using Lettuce Redis Command Annotation
Graph
- enrollEmitterOnExperiment
- fetchParticipantsOnExperiment
- graphQuery
TimeSeries
- pushEvent
JSON
- setObject
- getObject
- setPathValue
- getPathValue
Core
- HSET
- HGET / HGETALL
- HEXISTS
- …
Conclusion: Making A/B Testing Accessible to Everyone
A/B testing กลายเป็น integral สำหรับ marketer ใดๆ ที่แข่งขันใน digital playground วันนี้ แต่การได้ software นี้อาจ expensive บังคับหลายคน operate ด้วย sub-optimal website และทำให้ compound แม้แต่การสร้าง split-testing software ของตัวเองมี programming difficulties ของตัวเอง
การสร้างแอปพลิเคชันแบบนี้ต้องการ versatile และ powerful database ที่ capable ของ transmitting data efficiently ระหว่าง components แต่แม้กับ obstacles เหล่านี้ Redis removed all of these obstacles
From just by using Redis on your laptop, you can A/B test any variable on your website and bridge yourself closer to your target market. If you want to discover more about how this application was made, then make sure to watch this YouTube Video.
Yet despite these demands, Redis' advanced data processing capabilities made data transmission between components both hyper-efficient and reliable, creating a highly responsive application.
This meant no lags, no delays, and no causes of friction between the user and the application. From just by using Redis on your laptop, you can A/B test any variable on your website and bridge yourself closer to your target market.
If you want to discover more about how this application was made, then make sure to watch this YouTube Video.
If you've enjoyed this post then we also have many more for you to discover on the Redis Launchpad. From creating real-time vehicle tracking systems to building powerful drone systems to protect crop insurers in developing countries, Redis has been leveraged by programmers all over the world to improve everyday lives.
What can you do with Redis?
Who created the app?
Thiago Camargo
If you enjoyed this application then make sure to visit Thiago's GitHub page to keep up to date with all of the projects he's been involved in.